From b9bf8abf7b890daadf5347effa4ef9ea952cf22e Mon Sep 17 00:00:00 2001 From: Alec Larson <1925840+aleclarson@users.noreply.github.com> Date: Tue, 2 Jul 2024 15:07:43 -0400 Subject: [PATCH] refactor: remove variable --- src/array/replace.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/array/replace.ts b/src/array/replace.ts index 6855b275..11fe568b 100644 --- a/src/array/replace.ts +++ b/src/array/replace.ts @@ -20,8 +20,7 @@ export function replace( } const out = array.slice() for (let index = 0; index < array.length; index++) { - const item = array[index] - if (match(item, index)) { + if (match(array[index], index)) { out[index] = newItem break }