You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
parttimejob/node_modules/core-js/modules/esnext.iterator.to-array.js

18 lines
556 B

1 month ago
'use strict';
var $ = require('../internals/export');
var anObject = require('../internals/an-object');
var iterate = require('../internals/iterate');
var getIteratorDirect = require('../internals/get-iterator-direct');
var push = [].push;
// `Iterator.prototype.toArray` method
// https://github.com/tc39/proposal-iterator-helpers
$({ target: 'Iterator', proto: true, real: true }, {
toArray: function toArray() {
var result = [];
iterate(getIteratorDirect(anObject(this)), push, { that: result, IS_RECORD: true });
return result;
}
});