Minimalistic JavaScript library for working with collections of data.
Collection — minimalistic JavaScript library for working with collections of data.


Demo (threads)
Documentation
- Universal interface for multiple data types: arrays, typed arrays, tables, Map, Set, generators and @@iterator protocol;
- A rich set of iterators;
- Built-in self JIT compilation of requests provides a very high speed of execution, which is comparable to the native cycles JavaScript;
- Support lightweight threads based on generators;
- Transparent support for the data storage: LocalStorage, SessionStorage, IndexedDB;
- Work in browsers, as well as on the server (node.js);
- The engine is written in pure JavaScript and does not have any dependencies;
- The source code is designed to work with Google Closure Compiler in advanced mode;
- 3 basic types of the library:
- full (
min + gzip ~ 22kb);
- light (only base iterators,
min + gzip ~ 13kb);
- core (only
forEach, min + gzip ~ 11kb).
- The modular architecture allows to build your library;
- Good code coverage;
- Detailed documentation with examples.
$C(document.querySelectorAll('.foo')).forEach(function (el) {
...
}, {
reverse: true,
startIndex: 5
});
$C([1, 2, 3, 4]).get(function (el) { return el % 2 === 0; });
$C({a: 4, b: 16}).map(Math.sqrt);
$C().load({lib: 'indexedDB', id: 'foo'});
$C(new Array(1e8)).forEach(function () {
...
}, {thread: true});
The MIT License.