aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/core-utils/common
diff options
context:
space:
mode:
Diffstat (limited to 'shared/core-utils/common')
-rw-r--r--shared/core-utils/common/array.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/shared/core-utils/common/array.ts b/shared/core-utils/common/array.ts
index 95393c731..e1b422165 100644
--- a/shared/core-utils/common/array.ts
+++ b/shared/core-utils/common/array.ts
@@ -15,7 +15,13 @@ function arrayify <T> (element: T | T[]) {
15 return [ element ] 15 return [ element ]
16} 16}
17 17
18// Avoid conflict with other uniq() functions
19function uniqify <T> (elements: T[]) {
20 return Array.from(new Set(elements))
21}
22
18export { 23export {
24 uniqify,
19 findCommonElement, 25 findCommonElement,
20 arrayify 26 arrayify
21} 27}