Last change
on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
694 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
|
---|
3 | var $groupBy = require('../internals/array-group-by');
|
---|
4 | var typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');
|
---|
5 |
|
---|
6 | var aTypedArray = ArrayBufferViewCore.aTypedArray;
|
---|
7 | var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
|
---|
8 |
|
---|
9 | // `%TypedArray%.prototype.groupBy` method
|
---|
10 | // https://github.com/tc39/proposal-array-grouping
|
---|
11 | exportTypedArrayMethod('groupBy', function groupBy(callbackfn /* , thisArg */) {
|
---|
12 | var thisArg = arguments.length > 1 ? arguments[1] : undefined;
|
---|
13 | return $groupBy(aTypedArray(this), callbackfn, thisArg, typedArraySpeciesConstructor);
|
---|
14 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.