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.

esnext.set.every.js 660B

1234567891011121314151617
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var bind = require('../internals/function-bind-context');
  4. var aSet = require('../internals/a-set');
  5. var iterate = require('../internals/set-iterate');
  6. // `Set.prototype.every` method
  7. // https://github.com/tc39/proposal-collection-methods
  8. $({ target: 'Set', proto: true, real: true, forced: true }, {
  9. every: function every(callbackfn /* , thisArg */) {
  10. var set = aSet(this);
  11. var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  12. return iterate(set, function (value) {
  13. if (!boundFunction(value, value, set)) return false;
  14. }, true) !== false;
  15. }
  16. });