From 7e7cbcae0b80c1afeb828b3644037e43f9b70129 Mon Sep 17 00:00:00 2001 From: Slincnik Date: Tue, 14 Jan 2025 23:49:05 +0300 Subject: [PATCH] refactor: remove unusable func --- src/helpers/functions.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/helpers/functions.ts b/src/helpers/functions.ts index 7673ad2b..9772594e 100644 --- a/src/helpers/functions.ts +++ b/src/helpers/functions.ts @@ -6,14 +6,6 @@ export async function asyncForEach(collection: T[], callback: (_item: T) => P return await Promise.all(allPromises); } -export function sortByKey(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(pArray: T[]) { const array: T[] = [];