Node-Red configuration
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.

set-iterate.js 539B

1234567891011121314
  1. 'use strict';
  2. var uncurryThis = require('../internals/function-uncurry-this');
  3. var iterateSimple = require('../internals/iterate-simple');
  4. var SetHelpers = require('../internals/set-helpers');
  5. var Set = SetHelpers.Set;
  6. var SetPrototype = SetHelpers.proto;
  7. var forEach = uncurryThis(SetPrototype.forEach);
  8. var keys = uncurryThis(SetPrototype.keys);
  9. var next = keys(new Set()).next;
  10. module.exports = function (set, fn, interruptible) {
  11. return interruptible ? iterateSimple({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
  12. };