aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/utils.js')
-rw-r--r--web_src/js/utils.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/web_src/js/utils.js b/web_src/js/utils.js
index b511c9981d..b16b05a1b7 100644
--- a/web_src/js/utils.js
+++ b/web_src/js/utils.js
@@ -23,3 +23,8 @@ export function isObject(obj) {
export function isDarkTheme() {
return document.documentElement.classList.contains('theme-arc-green');
}
+
+// removes duplicate elements in an array
+export function uniq(arr) {
+ return Array.from(new Set(arr));
+}