This commit is contained in:
2023-08-11 10:45:20 +08:00
commit 161ca982f3
31850 changed files with 2706500 additions and 0 deletions

24
node_modules/core-js/modules/esnext.iterator.from.js generated vendored Normal file
View File

@ -0,0 +1,24 @@
'use strict';
var $ = require('../internals/export');
var call = require('../internals/function-call');
var toObject = require('../internals/to-object');
var isPrototypeOf = require('../internals/object-is-prototype-of');
var IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;
var createIteratorProxy = require('../internals/iterator-create-proxy');
var getIteratorFlattenable = require('../internals/get-iterator-flattenable');
var IS_PURE = require('../internals/is-pure');
var IteratorProxy = createIteratorProxy(function () {
return call(this.next, this.iterator);
}, true);
// `Iterator.from` method
// https://github.com/tc39/proposal-iterator-helpers
$({ target: 'Iterator', stat: true, forced: IS_PURE }, {
from: function from(O) {
var iteratorRecord = getIteratorFlattenable(typeof O == 'string' ? toObject(O) : O, true);
return isPrototypeOf(IteratorPrototype, iteratorRecord.iterator)
? iteratorRecord.iterator
: new IteratorProxy(iteratorRecord);
}
});