From d086b637c53b391922b8f2671a37f9f062e46102 Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 10 Oct 2017 15:52:41 -0700 Subject: [PATCH] Remove `removeWhere` (#19082) --- src/compiler/core.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 45a4a04b6ab..fb5000a58bf 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -356,21 +356,6 @@ namespace ts { return array; } - export function removeWhere(array: T[], f: (x: T) => boolean): boolean { - let outIndex = 0; - for (const item of array) { - if (!f(item)) { - array[outIndex] = item; - outIndex++; - } - } - if (outIndex !== array.length) { - array.length = outIndex; - return true; - } - return false; - } - export function filterMutate(array: T[], f: (x: T, i: number, array: T[]) => boolean): void { let outIndex = 0; for (let i = 0; i < array.length; i++) {