UNPKG

netpower-js

Version:

A common library that can be used for fe and be

17 lines 467 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Array.prototype.groupBy = function (groupFunc) { var map = new Map(); this.forEach(function (item) { var key = groupFunc(item); var collection = map.get(key); if (!collection) { map.set(key, [item]); } else { collection.push(item); } }); return map; }; //# sourceMappingURL=array.js.map