0.1.2 • Published 6 years ago
set-unionto v0.1.2
set-unionto
NOTE: set-unionto was renamed to @extra-set/union.
Get union of two sets.
const unionTo = require('set-unionto');
// unionTo(<set1>, <set2>, [target=new Set()])
var a = new Set('call');
var b = new Set('fall');
unionTo(a, b);
// Set {'c', 'a', 'l', 'f'}
unionTo(a, b, a);
// Set {'c', 'a', 'l', 'f'} (set "a" modified)
unionTo(a, b, b);
// Set {'f', 'a', 'l', 'c'} (set "b" modified)