MCPcopy Index your code
hub / github.com/Effect-TS/effect / arraySpliceOut

Function arraySpliceOut

packages/effect/src/internal/hashMap/array.ts:14–31  ·  view source on GitHub ↗
(mutate: boolean, at: number, arr: Array<A>)

Source from the content-addressed store, hash-verified

12
13/** @internal */
14export function arraySpliceOut<A>(mutate: boolean, at: number, arr: Array<A>) {
15 const newLen = arr.length - 1
16 let i = 0
17 let g = 0
18 let out = arr
19 if (mutate) {
20 i = g = at
21 } else {
22 out = new Array(newLen)
23 while (i < at) out[g++] = arr[i++]!
24 }
25 ++i
26 while (i <= newLen) out[g++] = arr[i++]!
27 if (mutate) {
28 out.length = newLen
29 }
30 return out
31}
32
33/** @internal */
34export function arraySpliceIn<A>(mutate: boolean, at: number, v: A, arr: Array<A>) {

Callers 2

updateCollisionListMethod · 0.85
modifyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…