summaryrefslogtreecommitdiff
path: root/master/server/src/utility.ts
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-05-31 11:35:32 +0200
committerHampusM <hampus@hampusmat.com>2022-05-31 11:35:32 +0200
commite75bc5d3fe24979ca59c995a7decbcbf720a20a8 (patch)
tree6e89a71e982473abde2a31354d43f4bf6230afac /master/server/src/utility.ts
parent2212cbab4fea2f66b2736401a3f7f53f31bb898e (diff)
style(master): change server eol to LF
Diffstat (limited to 'master/server/src/utility.ts')
-rw-r--r--master/server/src/utility.ts32
1 files changed, 16 insertions, 16 deletions
diff --git a/master/server/src/utility.ts b/master/server/src/utility.ts
index 6a02575..f0061f7 100644
--- a/master/server/src/utility.ts
+++ b/master/server/src/utility.ts
@@ -1,16 +1,16 @@
-export function filter_object<
- ObjectType,
- Key extends keyof ObjectType,
- Value extends ObjectType[keyof ObjectType]
->(
- obj: ObjectType,
- filter_cb: (key: Key, value: Value) => boolean
-) {
- const entries = Object.entries(obj);
-
- const filtered = entries.filter(([ str_key, any_value ]) => {
- return filter_cb(str_key as Key, any_value as Value);
- });
-
- return Object.fromEntries(filtered) as ObjectType;
-}
+export function filter_object<
+ ObjectType,
+ Key extends keyof ObjectType,
+ Value extends ObjectType[keyof ObjectType]
+>(
+ obj: ObjectType,
+ filter_cb: (key: Key, value: Value) => boolean
+) {
+ const entries = Object.entries(obj);
+
+ const filtered = entries.filter(([ str_key, any_value ]) => {
+ return filter_cb(str_key as Key, any_value as Value);
+ });
+
+ return Object.fromEntries(filtered) as ObjectType;
+}