Skip to content

Commit

Permalink
Merge pull request #80 from yauheni-deriv/evgeniy/88921/packages_shar…
Browse files Browse the repository at this point in the history
…ed_utils_array_ts_migration

refactor: packages shared utils array ts migration
  • Loading branch information
niloofar-deriv committed Feb 21, 2023
2 parents a12cbc7 + def91ad commit f3f9a44
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/shared/src/utils/array/array.js

This file was deleted.

7 changes: 7 additions & 0 deletions packages/shared/src/utils/array/array.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const shuffleArray = <T>(array: T[]): T[] => {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
};
File renamed without changes.

0 comments on commit f3f9a44

Please sign in to comment.