massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / internals / typed-array-from-species-and-list.js
index b4998ae53a23f1359a5fa77981070e950206aa0b..d63ab566fe459ca89a4402b8e1bc5fd79bd2b010 100644 (file)
@@ -1,11 +1,6 @@
-var aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor;
-var speciesConstructor = require('../internals/species-constructor');
+var arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list');
+var typedArraySpeciesConstructor = require('../internals/typed-array-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;
+  return arrayFromConstructorAndList(typedArraySpeciesConstructor(instance), list);
 };