diff options
author | Ali Hasani <a.hassssani@gmail.com> | 2020-05-20 19:07:30 +0430 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 10:37:30 -0400 |
commit | 22da75b8e554f69e552d6312c1ce412cbc6d05bd (patch) | |
tree | 9f50b2c6ea709f5d1fb36d29d29e69a6ae5fb7f6 /std/node/_utils.ts | |
parent | 7630326b4c5ed32377f34a6668beac626d5156ac (diff) |
feat(std/node): first pass at url module (#4700)
Diffstat (limited to 'std/node/_utils.ts')
-rw-r--r-- | std/node/_utils.ts | 5 |
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(); +} |