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

Function keyValueArrayGet

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

Source from the content-addressed store, hash-verified

217 * @return The `value` stored at the `key` location or `undefined if not found.
218 */
219export function keyValueArrayGet<V>(keyValueArray: KeyValueArray<V>, key: string): V | undefined {
220 const index = keyValueArrayIndexOf(keyValueArray, key);
221 if (index >= 0) {
222 // if we found it retrieve it.
223 return keyValueArray[index | 1] as V;
224 }
225 return undefined;
226}
227
228/**
229 * Retrieve a `key` index value in the array or `-1` if not found.

Callers 2

findStylingValueFunction · 0.90

Calls 1

keyValueArrayIndexOfFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…