2.0.1 • Published 4 years ago

@extra-set/union-bang.min v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Gets union of set with an iterable.

This is part of package extra-set.

This is browserified, minified version of @extra-set/union-bang. It is exported as global variable set_union. CDN: unpkg, jsDelivr.

const unionTo = require('@extra-set/union');
// 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)

extra-set