(keyValueArray: KeyValueArray<V>, key: string)
| 217 | * @return The `value` stored at the `key` location or `undefined if not found. |
| 218 | */ |
| 219 | export 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. |
no test coverage detected
searching dependent graphs…