export function createMap<TSource, TKey, TValue>(items: Iterable<TSource>, keySelector: (x: TSource) => TKey, valueSelector: (x: TSource) => TValue): Map<TKey, TValue> { const m = new Map<TKey, TValue>(); for (const item of items) { const key = keySelector(item); const value = valueSelector(item); m.set(key, value); } return m; }
867000cookie-checkTypescript create map