MCPcopy Index your code
hub / github.com/nodejs/node / arrayToMultiMap

Function arrayToMultiMap

test/fixtures/snapshot/typescript.js:1578–1586  ·  view source on GitHub ↗
(values, makeKey, makeValue)

Source from the content-addressed store, hash-verified

1576 }
1577 ts.arrayToNumericMap = arrayToNumericMap;
1578 function arrayToMultiMap(values, makeKey, makeValue) {
1579 if (makeValue === void 0) { makeValue = identity; }
1580 var result = createMultiMap();
1581 for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {
1582 var value = values_1[_i];
1583 result.add(makeKey(value), makeValue(value));
1584 }
1585 return result;
1586 }
1587 ts.arrayToMultiMap = arrayToMultiMap;
1588 function group(values, getGroupId, resultSelector) {
1589 if (resultSelector === void 0) { resultSelector = identity; }

Callers 1

groupFunction · 0.85

Calls 3

createMultiMapFunction · 0.85
makeKeyFunction · 0.85
addMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…