From b73a15cf34b876ba4c6f1375c5f425cea18f6dbc Mon Sep 17 00:00:00 2001 From: Andrew Bulat Date: Fri, 25 Oct 2024 07:35:45 +0100 Subject: [PATCH] Remove Utils.arrSubtract, as it is preffered to use `arr.filter((x) => !otherArr.includes(x))` instead --- src/common/lib/util/utils.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/common/lib/util/utils.ts b/src/common/lib/util/utils.ts index f1af5ff36..b88f9dd4b 100644 --- a/src/common/lib/util/utils.ts +++ b/src/common/lib/util/utils.ts @@ -165,15 +165,6 @@ export function arrIntersectOb(arr: Array, ob: Partial(arr1: Array, arr2: Array): Array { - const result = []; - for (let i = 0; i < arr1.length; i++) { - const element = arr1[i]; - if (arr2.indexOf(element) == -1) result.push(element); - } - return result; -} - export function arrDeleteValue(arr: Array, val: T): boolean { const idx = arr.indexOf(val); const res = idx != -1;