package
Creates a new Set from the union of two Sets or arrays
npm install set-unionGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Creates a new Set from the union of two Sets or arrays
$ npm install --save set-unionconst union = require('set-union');
union(new Set([1, 2, 3]), new Set([2, 3, 4]));
// => Set { 1, 2, 3, 4 }
union([1, 2, 3], [2, 3, 4]);
// => Set { 1, 2, 3, 4 }Will return a new Set containing the elements contained in both set1 and set2. set1 and set2 must be Iterables, like arrays and Sets are.
MIT © Jeroen Engels