From 22da75b8e554f69e552d6312c1ce412cbc6d05bd Mon Sep 17 00:00:00 2001 From: Ali Hasani Date: Wed, 20 May 2020 19:07:30 +0430 Subject: feat(std/node): first pass at url module (#4700) --- std/node/_utils.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'std/node/_utils.ts') 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( .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(); +} -- cgit v1.2.3