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.

es.set.intersection.v2.js 669B

12345678910111213141516
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var fails = require('../internals/fails');
  4. var intersection = require('../internals/set-intersection');
  5. var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
  6. var INCORRECT = !setMethodAcceptSetLike('intersection') || fails(function () {
  7. // eslint-disable-next-line es/no-array-from, es/no-set -- testing
  8. return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
  9. });
  10. // `Set.prototype.intersection` method
  11. // https://github.com/tc39/proposal-set-methods
  12. $({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
  13. intersection: intersection
  14. });