Last change
on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
619 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
3 | var $groupBy = require('../internals/array-group-by');
|
---|
4 | var arraySpeciesConstructor = require('../internals/array-species-constructor');
|
---|
5 | var addToUnscopables = require('../internals/add-to-unscopables');
|
---|
6 |
|
---|
7 | // `Array.prototype.groupBy` method
|
---|
8 | // https://github.com/tc39/proposal-array-grouping
|
---|
9 | $({ target: 'Array', proto: true }, {
|
---|
10 | groupBy: function groupBy(callbackfn /* , thisArg */) {
|
---|
11 | var thisArg = arguments.length > 1 ? arguments[1] : undefined;
|
---|
12 | return $groupBy(this, callbackfn, thisArg, arraySpeciesConstructor);
|
---|
13 | }
|
---|
14 | });
|
---|
15 |
|
---|
16 | addToUnscopables('groupBy');
|
---|
Note:
See
TracBrowser
for help on using the repository browser.