.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / modules / es.typed-array.map.js
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 var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
9
10 // `%TypedArray%.prototype.map` method
11 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
12 exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {
13   return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
14     return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length);
15   });
16 });