1 | 'use strict';
|
2 | var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
|
3 | var $map = require('../internals/array-iteration').map;
|
4 | var speciesConstructor = require('../internals/species-constructor');
|
5 |
|
6 | var aTypedArray = ArrayBufferViewCore.aTypedArray;
|
7 | var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
|
8 |
|
9 |
|
10 |
|
11 | ArrayBufferViewCore.exportProto('map', function map(mapfn /* , thisArg */) {
|
12 | return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
|
13 | return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length);
|
14 | });
|
15 | });
|