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-clone.js 311B

1234567891011121314
  1. 'use strict';
  2. var SetHelpers = require('../internals/set-helpers');
  3. var iterate = require('../internals/set-iterate');
  4. var Set = SetHelpers.Set;
  5. var add = SetHelpers.add;
  6. module.exports = function (set) {
  7. var result = new Set();
  8. iterate(set, function (it) {
  9. add(result, it);
  10. });
  11. return result;
  12. };