This package contains JavaScript implementations of common data structures with idiomatic interfaces.
JavaScript HTML
Latest commit 72d5643 Dec 28, 2017
Permalink
Failed to load latest commit information.
bench Fix wrong hrtime handling Apr 11, 2013
demo Some backward compatibility breaking changes: Apr 17, 2016
listen fix weak-map require module path Jul 27, 2017
test Merge pull request #171 from simon-weber/fix_sorted_array_incomparable Dec 28, 2017
.editorconfig Create .editorconfig Feb 16, 2015
.gitignore upgrade test stack to montage-testing Mar 28, 2017
.jshintignore add jshint files Mar 28, 2017
.jshintrc add jshint files Mar 28, 2017
.npmignore fix weak-map require module path Jul 27, 2017
.travis.yml update travis build Mar 28, 2017
CHANGES.md Update CHANGES.md Dec 7, 2017
FUTURE.md Redirect users to collectionsjs.com for documentation Jun 16, 2014
LICENSE.md Fix copyright in license Jul 29, 2014
README.md Update README.md Dec 7, 2017
_dict.js Changes for IE10, required to break some cyclical dependencies Jun 8, 2016
_fast-set.js Changes for IE10, required to break some cyclical dependencies Jun 8, 2016
_list.js fix typo Dec 28, 2017
_map.js Makes collection use map and set polyfill for IE11 Jun 18, 2016
_set.js Fixes an infinite loop Oct 17, 2016
bower.json prepare 5.1.2 Dec 28, 2017
checklist.csv Implement deleteAll Jul 11, 2014
collections.cat.js Version 0.1.1 Nov 7, 2012
collections.js fix weak-map require module path Jul 27, 2017
collections.min.js update collections.min.js build Dec 28, 2017
deque.js display warning only once on Array.proto.(find|findLast) function cal… Dec 7, 2017
dict.js Changes for IE10, required to break some cyclical dependencies Jun 8, 2016
fast-map.js Some backward compatibility breaking changes: Apr 17, 2016
fast-set.js Changes for IE10, required to break some cyclical dependencies Jun 8, 2016
generic-collection.js Some backward compatibility breaking changes: Apr 17, 2016
generic-map.git.js Changes for IE10, required to break some cyclical dependencies Jun 8, 2016
generic-map.js fixes a bug that makes map polyfill’s set behaves differently than st… Oct 17, 2016
generic-order.js Add toJSON method to collections Jul 11, 2014
generic-set.js Some backward compatibility breaking changes: Apr 17, 2016
heap.js Some backward compatibility breaking changes: Apr 17, 2016
iterator.js Some backward compatibility breaking changes: Apr 17, 2016
karma.conf.js improve test stack Jul 28, 2017
lfu-map.js Some backward compatibility breaking changes: Apr 17, 2016
lfu-set.js Some backward compatibility breaking changes: Apr 17, 2016
list.js Changes for IE10, required to break some cyclical dependencies Jun 8, 2016
lru-map.js Some backward compatibility breaking changes: Apr 17, 2016
lru-set.js Some backward compatibility breaking changes: Apr 17, 2016
map.js fixes a bug in IE11 where sets and maps would not dispatch changes wh… Jun 26, 2016
minify Adjust change listener interface Nov 4, 2012
multi-map.js fix possible undefined error Dec 12, 2017
package.json prepare 5.1.2 Dec 28, 2017
set.js add missing property quote in set.js Dec 12, 2017
shim-array.js reuse define method in array-shim to expose find polyfill Dec 12, 2017
shim-function.js Function by and get Jan 22, 2013
shim-object.js fix weak-map require module path Jul 27, 2017
shim-regexp.js Shim RegExp Jan 20, 2013
shim.js Shim RegExp Jan 20, 2013
sorted-array-map.js Some backward compatibility breaking changes: Apr 17, 2016
sorted-array-set.js Some backward compatibility breaking changes: Apr 17, 2016
sorted-array.js fix sorted-array incomparable value bugs [closes #27] Dec 9, 2017
sorted-map.js Merge pull request #152 from marchant/fix#149 Jun 8, 2016
sorted-set.js Some backward compatibility breaking changes: Apr 17, 2016
tree-log.js Strict mode Oct 27, 2012
weak-map.js fix weak-map require module path Jul 27, 2017

README.md

Collections

npm version

Build Status

Analytics

This package contains JavaScript implementations of common data structures with idiomatic iterfaces, including extensions for Array and Object.

You can use these Node Packaged Modules with Node.js, Browserify, Mr, or any compatible CommonJS module loader. Using a module loader or bundler when using Collections in web browsers has the advantage of only incorporating the modules you need. However, you can just embed <script src="collections/collections.min.js"> and all of the collections will be introduced as globals. ⚠️ require("collections") is not supported.

npm install collections --save

Documentation can be found at http://collectionsjs.com which in turn can be updated at https://github.com/montagejs/collectionsjs.com.

Maintenance

Tests are in the test directory. Use npm test to run the tests in NodeJS or open test/run.html in a browser.

To run the tests in your browser, simply use npm run test:jasmine.

To run the tests using Karma use npm run test:karma and for continious tests run with file changes detection npm run test:karma-dev. Finally to open a remote debug console on karma use npm run test:karma-debug.

Design principles

  • extends core types (e.g extends Array.prototype with additional non-enumerable properties like .set)