aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/core-utils/utils
diff options
context:
space:
mode:
Diffstat (limited to 'shared/core-utils/utils')
-rw-r--r--shared/core-utils/utils/array.ts13
-rw-r--r--shared/core-utils/utils/index.ts2
-rw-r--r--shared/core-utils/utils/object.ts15
3 files changed, 0 insertions, 30 deletions
diff --git a/shared/core-utils/utils/array.ts b/shared/core-utils/utils/array.ts
deleted file mode 100644
index 9e326a5aa..000000000
--- a/shared/core-utils/utils/array.ts
+++ /dev/null
@@ -1,13 +0,0 @@
1function findCommonElement <T> (array1: T[], array2: T[]) {
2 for (const a of array1) {
3 for (const b of array2) {
4 if (a === b) return a
5 }
6 }
7
8 return null
9}
10
11export {
12 findCommonElement
13}
diff --git a/shared/core-utils/utils/index.ts b/shared/core-utils/utils/index.ts
deleted file mode 100644
index 8d16365a8..000000000
--- a/shared/core-utils/utils/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
1export * from './array'
2export * from './object'
diff --git a/shared/core-utils/utils/object.ts b/shared/core-utils/utils/object.ts
deleted file mode 100644
index 9a8a98f9b..000000000
--- a/shared/core-utils/utils/object.ts
+++ /dev/null
@@ -1,15 +0,0 @@
1function pick <O extends object, K extends keyof O> (object: O, keys: K[]): Pick<O, K> {
2 const result: any = {}
3
4 for (const key of keys) {
5 if (Object.prototype.hasOwnProperty.call(object, key)) {
6 result[key] = object[key]
7 }
8 }
9
10 return result
11}
12
13export {
14 pick
15}