MCPcopy Create free account
hub / github.com/weaveworks/scope / insertElement

Function insertElement

client/app/scripts/utils/array-utils.js:14–16  ·  view source on GitHub ↗
(array, index, element)

Source from the content-addressed store, hash-verified

12}
13
14export function insertElement(array, index, element) {
15 return array.slice(0, index).concat([element], array.slice(index));
16}
17
18export function removeElement(array, index) {
19 return array.slice(0, index).concat(array.slice(index + 1));

Callers 2

moveElementFunction · 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…