MCPcopy Create free account
hub / github.com/Snapchat/Valdi / arrayToMapFn

Function arrayToMapFn

src/valdi_modules/src/valdi/foundation/src/map.ts:48–50  ·  view source on GitHub ↗
(key: (item: T) => K)

Source from the content-addressed store, hash-verified

46 * Provides a function that can be used to map arrays to string maps
47 */
48export function arrayToMapFn<K, T>(key: (item: T) => K): (arr: T[]) => Map<K, T> {
49 return (arr: T[]) => arrayToMap(arr, key);
50}
51
52/**
53 * Computes the union of two Maps and returns the result as a new Map

Callers

nothing calls this directly

Calls 1

arrayToMapFunction · 0.85

Tested by

no test coverage detected