uniteSets.js 200 B

12345678
  1. /**
  2. * Unite two or more sets
  3. *
  4. * @param {Iterable<string>[]} args
  5. */
  6. module.exports = function uniteSets(...args) {
  7. return new Set([...args].reduce((result, set) => [...result, ...set], []));
  8. };