41a406e0d70bdf1bc2a9bfc2bdbbb323acea600d57d9639dfa94e66edeb8407b129522a9fbc9a979cb53dc2831125bf39e041cdfce67ca8b3b6689c79f5488 708 B

123456789101112131415
  1. 'use strict';
  2. var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
  3. var $map = require('../internals/array-iteration').map;
  4. var typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');
  5. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  6. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  7. // `%TypedArray%.prototype.map` method
  8. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
  9. exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {
  10. return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
  11. return new (typedArraySpeciesConstructor(O))(length);
  12. });
  13. });