projecte_ionic/node_modules/core-js/internals/typed-array-from-species-and-list.js
2022-02-09 18:30:03 +01:00

12 lines
455 B
JavaScript
Executable file

var aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor;
var speciesConstructor = require('../internals/species-constructor');
module.exports = function (instance, list) {
var C = speciesConstructor(instance, instance.constructor);
var index = 0;
var length = list.length;
var result = new (aTypedArrayConstructor(C))(length);
while (length > index) result[index] = list[index++];
return result;
};