source: node_modules/core-js-pure/internals/array-from-constructor-and-list.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 348 bytes
Line 
1'use strict';
2var lengthOfArrayLike = require('../internals/length-of-array-like');
3
4module.exports = function (Constructor, list, $length) {
5 var index = 0;
6 var length = arguments.length > 2 ? $length : lengthOfArrayLike(list);
7 var result = new Constructor(length);
8 while (length > index) result[index] = list[index++];
9 return result;
10};
Note: See TracBrowser for help on using the repository browser.