We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add static methods to created instance of HashSet:
HashSet
merge
intersect
subtract
const hashSet = require('hash-set'); // Create Set class which compares objects with JSON.stringify const JSONSet = hashSet(JSON.stringify); const set1 = new JSONSet([{ a: 1 }, { b: 2 }]); const set2 = new JSONSet([{ c: 3 }, { b: 2 }]); JSONSet.merge(set1, set2); // [{ a: 1 }, { c: 3 }, { b: 2 }] JSONSet.intersect(set1, set2); // [{ b: 2 }] JSONSet.subtract(set1, set2); // [{ a: 1 }]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Add static methods to created instance of
HashSet
:merge
intersect
subtract
The text was updated successfully, but these errors were encountered: