MCPcopy Index your code
hub / github.com/nodejs/node / spliceOne

Function spliceOne

lib/internal/util.js:535–539  ·  view source on GitHub ↗
(list, index)

Source from the content-addressed store, hash-verified

533// As of V8 6.6, depending on the size of the array, this is anywhere
534// between 1.5-10x faster than the two-arg version of Array#splice()
535function spliceOne(list, index) {
536 for (; index + 1 < list.length; index++)
537 list[index] = list[index + 1];
538 list.pop();
539}
540
541const kNodeModulesRE = /^(?:.*)[\\/]node_modules[\\/]/;
542

Callers 3

url.jsFile · 0.85
events.jsFile · 0.85
mainFunction · 0.85

Calls 1

popMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…