source: node_modules/core-js-pure/modules/esnext.iterator.to-array.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: 556 bytes
Line 
1'use strict';
2var $ = require('../internals/export');
3var anObject = require('../internals/an-object');
4var iterate = require('../internals/iterate');
5var getIteratorDirect = require('../internals/get-iterator-direct');
6
7var push = [].push;
8
9// `Iterator.prototype.toArray` method
10// https://github.com/tc39/proposal-iterator-helpers
11$({ target: 'Iterator', proto: true, real: true }, {
12 toArray: function toArray() {
13 var result = [];
14 iterate(getIteratorDirect(anObject(this)), push, { that: result, IS_RECORD: true });
15 return result;
16 }
17});
Note: See TracBrowser for help on using the repository browser.