MCPcopy Create free account
hub / github.com/node-modules/utility / spliceOne

Function spliceOne

benchmark/array_splice.cjs:14–20  ·  view source on GitHub ↗
(array, index)

Source from the content-addressed store, hash-verified

12}
13
14function spliceOne(array, index) {
15 for (let i = index, k = i + 1, n = array.length; k < n; i += 1, k += 1) {
16 array[i] = array[k];
17 }
18 array.pop();
19 return array;
20}
21
22class SubArray extends Array {
23 spliceOne(index) {

Callers 2

array.test.tsFile · 0.90
array_splice.cjsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…