summaryrefslogtreecommitdiff
path: root/std/node/_utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/node/_utils.ts')
-rw-r--r--std/node/_utils.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/std/node/_utils.ts b/std/node/_utils.ts
index 352179f4a..b8c4fa00e 100644
--- a/std/node/_utils.ts
+++ b/std/node/_utils.ts
@@ -39,3 +39,8 @@ export function intoCallbackAPIWithIntercept<T1, T2>(
.then((value) => cb && cb(null, interceptor(value)))
.catch((err) => cb && cb(err, null));
}
+
+export function spliceOne(list: string[], index: number): void {
+ for (; index + 1 < list.length; index++) list[index] = list[index + 1];
+ list.pop();
+}