aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/core-utils/common
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 15:36:03 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 15:36:03 +0200
commit690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3 (patch)
treeb16b8536acd2098aba8c1d6fe13a336dd6aa01a9 /shared/core-utils/common
parentbbd5aa7ead5f1554a0872963f957effc26d8c630 (diff)
downloadPeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.tar.gz
PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.tar.zst
PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.zip
Prefer using Object.values
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}