UNPKG

@modern-kit/utils

Version:
16 lines (14 loc) 316 B
function groupBy(arr, iteratee) { const group = {}; for (let i = 0; i < arr.length; i++) { const item = arr[i]; const key = iteratee(item); if (group[key] == null) { group[key] = []; } group[key].push(item); } return group; } export { groupBy }; //# sourceMappingURL=index.mjs.map