UNPKG

@typed/test

Version:
15 lines 397 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function collectByKey(f, list) { const record = {}; for (const item of list) { const key = f(item); if (!record[key]) { record[key] = []; } record[key].push(item); } return record; } exports.collectByKey = collectByKey; //# sourceMappingURL=collectByKey.js.map