Uniq.js extends Javascript Set.
npm install @nyinyithann/uniq.jsUniq.js is a JavaScript library for nodeJS and browser. Uniq.js extends JavaScript Set. The library is heavily inspired and influenced by F# Set module.
Please go to Uniq APIs to read more.
``javascript`
npm install @nyinyithann/uniq.js
Uniq extends Set. All built-in methods of Set can be used with Uniq. And Uniq.js provides additional methods.`javascript`
const somePrimes = new Uniq([2, 3, 5, 7, 11, 13]);
const someEvens = new Uniq([2, 4, 6, 8, 10]);
const evenPrime = somePrimes.intersect(someEvens);
console.log(evenPrime);
// => [Uniq] { 2 }
Uniq has the following methods.
#### Static Methods
``
of
empty
#### Instance Methods
```
isEmpty
exists
filter
map
fold
foldRight
every
partition
toArray
toMap
intersect
isProperSubsetOf
isProperSupersetOf
isSubsetOf
isSupersetOf
union
difference
Nyi Nyi Than - @nyinyithann
- Exploring ES6 By Dr. Axel Rauschmayer
- Understanding ECMAScript 6 By Nicholas C. Zakas
- Collection Pipeline
by Martin Fowler
- javascript.info
MIT