setjs - Set data structure for JavaScript
setjs
implements a a Set API inspired by Python. There are some differences, though. The biggest difference is that the API is immutable by design. There is a basic set
structure and functions that operate upon it. Consider the API below:
var a = ; // set accepts arbitrary amount of items and may be emptyvar b = ; set; // 2set; // trueset; // trueset; // false set; // {3, 4, 5}set; // {4}set; // {5}set; // {3, 5}
The functions above may be used to perform various manipulations on sets.
Contributors
- David Ellis - Made library truly immutable.
License
MIT.