@extra-set/union-bang.min

Gets union of set with an iterable. > This is part of package [extra-set].

Usage no npm install needed!

<script type="module">
  import extraSetUnionBangMin from 'https://cdn.skypack.dev/@extra-set/union-bang.min';
</script>

README

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