first commit

This commit is contained in:
Warunee Tamkoo 2023-09-06 14:51:44 +07:00
commit eb2f504652
32490 changed files with 5731109 additions and 0 deletions

View file

@ -0,0 +1,17 @@
'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;
}
});