mirror of
https://github.com/JonnyBro/JaBa.git
synced 2025-01-20 01:13:47 +05:00
refactor: remove unusable func
This commit is contained in:
parent
2eab0d541e
commit
7e7cbcae0b
1 changed files with 0 additions and 8 deletions
|
@ -6,14 +6,6 @@ export async function asyncForEach<T>(collection: T[], callback: (_item: T) => P
|
||||||
return await Promise.all(allPromises);
|
return await Promise.all(allPromises);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sortByKey<T>(array: T[], key: string) {
|
|
||||||
return array.sort(function (a, b) {
|
|
||||||
const x = a[key];
|
|
||||||
const y = b[key];
|
|
||||||
return x < y ? 1 : x > y ? -1 : 0;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function shuffle<T>(pArray: T[]) {
|
export function shuffle<T>(pArray: T[]) {
|
||||||
const array: T[] = [];
|
const array: T[] = [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue