group-by.js 462 B

12345678910111213
  1. 'use strict';
  2. require('../../modules/es.map');
  3. require('../../modules/esnext.map.group-by');
  4. var call = require('../../internals/function-call');
  5. var isCallable = require('../../internals/is-callable');
  6. var path = require('../../internals/path');
  7. var Map = path.Map;
  8. var mapGroupBy = Map.groupBy;
  9. module.exports = function groupBy(source, iterable, keyDerivative) {
  10. return call(mapGroupBy, isCallable(this) ? this : Map, source, iterable, keyDerivative);
  11. };