MCPcopy
hub / github.com/bugy/script-server / removeElement

Function removeElement

web-src/src/common/utils/common.js:197–204  ·  view source on GitHub ↗
(array, element)

Source from the content-addressed store, hash-verified

195}
196
197export function removeElement(array, element) {
198 var index = array.indexOf(element);
199 if (index >= 0) {
200 array.splice(index, 1);
201 }
202
203 return array;
204}
205
206// removes elements from the array, for which predicate is true
207export function removeElementIf(array, predicate) {

Callers 7

handleMethod · 0.90
UPDATE_SINGLE_VALUEFunction · 0.90
UPDATE_FORCED_PARAMETERSFunction · 0.90
UPDATE_SCRIPT_CONFIGFunction · 0.90
getElementClassesFunction · 0.90
removeElementsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected