esnext.array.group-by-to-map.js 662 B

12345678910111213141516
  1. 'use strict';
  2. // TODO: Remove from `core-js@4`
  3. var $ = require('../internals/export');
  4. var arrayMethodIsStrict = require('../internals/array-method-is-strict');
  5. var addToUnscopables = require('../internals/add-to-unscopables');
  6. var $groupToMap = require('../internals/array-group-to-map');
  7. var IS_PURE = require('../internals/is-pure');
  8. // `Array.prototype.groupByToMap` method
  9. // https://github.com/tc39/proposal-array-grouping
  10. // https://bugs.webkit.org/show_bug.cgi?id=236541
  11. $({ target: 'Array', proto: true, name: 'groupToMap', forced: IS_PURE || !arrayMethodIsStrict('groupByToMap') }, {
  12. groupByToMap: $groupToMap
  13. });
  14. addToUnscopables('groupByToMap');