Skip to content

jfmengels/set-union

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

set-union Build Status

Creates a new Set from the union of two Sets or arrays

Install

$ npm install --save set-union

Usage

const 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 }

API

union(set1, set2)

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.

License

MIT © Jeroen Engels

About

No description or website provided.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published