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