diff options
author | 2021-08-15 17:15:09 +0530 | |
---|---|---|
committer | 2021-08-15 13:54:00 +0000 | |
commit | bc76d19c6f5687dd18c96db249e0abe7ad79a673 (patch) | |
tree | d4e977f99be77d723ce93bb3866468d8b63ec038 /src/helpers/array-helpers.ts | |
parent | chore: npm upgrades (diff) | |
download | ferdium-app-bc76d19c6f5687dd18c96db249e0abe7ad79a673.tar.gz ferdium-app-bc76d19c6f5687dd18c96db249e0abe7ad79a673.tar.zst ferdium-app-bc76d19c6f5687dd18c96db249e0abe7ad79a673.zip |
chore: typescript conversion of some minor utilities
Also removed 'targz' unused package from runtime.
Diffstat (limited to 'src/helpers/array-helpers.ts')
-rw-r--r-- | src/helpers/array-helpers.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/helpers/array-helpers.ts b/src/helpers/array-helpers.ts new file mode 100644 index 000000000..ae5d8d99f --- /dev/null +++ b/src/helpers/array-helpers.ts | |||
@@ -0,0 +1,4 @@ | |||
1 | export const shuffleArray = (arr: any[]) => arr | ||
2 | .map((a) => [Math.random(), a]) | ||
3 | .sort((a, b) => a[0] - b[0]) | ||
4 | .map((a) => a[1]); | ||