UNPKG

es-grid-template

Version:

es-grid-template

17 lines (16 loc) 335 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = groupBy; function groupBy(list, iteratee) { const groups = {}; for (const item of list) { const key = iteratee(item); if (groups[key] == null) { groups[key] = []; } groups[key].push(item); } return groups; }