es6-native-set
Set collection as specified in ECMAScript6
Uses native C++ unordered_set container, so the memory is stored outside of node and it is a lot faster than native JS implementations.
As of 2.0.0, requires node.js 0.12 or later. If you are running node.js 0.10, stick with the 1.x.x.
Usage
var Set = ;
Installation
$ npm install es6-native-set
API
Best is to refer to specification. Still if you want quick look, follow examples:
var Set = ; var set = ; set;setsize; // 3set; // trueset; // falseset; // setsetsize // 4set; // trueset; // trueset; // truesetsize; // 3 set; var iterator = set; iteratornext; // { done: false, value: 'raz' }iteratornext; // { done: false, value: {} }iteratornext; // { done: false, value: 'foo' }iteratornext; // { done: true, value: undefined } setclear; // undefinedsetsize; // 0
This package is made possible because of Grokker, one of the best places to work. If you are a JS developer looking for a new gig, send me an email at ['chad', String.fromCharCode(64), 'grokker', String.fromCharCode(0x2e), 'com'].join('').