PromoCursed/node_modules/core-js/internals/set-iterate.js

15 lines
539 B
JavaScript
Raw Normal View History

2024-08-20 23:25:37 +04:00
'use strict';
var uncurryThis = require('../internals/function-uncurry-this');
var iterateSimple = require('../internals/iterate-simple');
var SetHelpers = require('../internals/set-helpers');
var Set = SetHelpers.Set;
var SetPrototype = SetHelpers.proto;
var forEach = uncurryThis(SetPrototype.forEach);
var keys = uncurryThis(SetPrototype.keys);
var next = keys(new Set()).next;
module.exports = function (set, fn, interruptible) {
return interruptible ? iterateSimple({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
};