MCPcopy Index your code
hub / github.com/angular/angular / keyValueArrayDelete

Function keyValueArrayDelete

packages/core/src/util/array_utils.ts:252–259  ·  view source on GitHub ↗
(keyValueArray: KeyValueArray<V>, key: string)

Source from the content-addressed store, hash-verified

250 * been.)
251 */
252export function keyValueArrayDelete<V>(keyValueArray: KeyValueArray<V>, key: string): number {
253 const index = keyValueArrayIndexOf(keyValueArray, key);
254 if (index >= 0) {
255 // if we found it remove it.
256 arraySplice(keyValueArray, index, 2);
257 }
258 return index;
259}
260
261/**
262 * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.

Callers 1

Calls 2

keyValueArrayIndexOfFunction · 0.85
arraySpliceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…