Skip to content
This package contains JavaScript implementations of common data structures with idiomatic interfaces.
Branch: master
Clone or download
Latest commit 0a26b99 Feb 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bench Fix wrong hrtime handling Apr 11, 2013
demo Some backward compatibility breaking changes: Apr 17, 2016
listen
test Add change dispatch to Set.size in polyfill Feb 4, 2019
.editorconfig
.gitignore
.jshintignore
.jshintrc
.npmignore fix weak-map require module path Jul 27, 2017
.travis.yml Add deploy to travis Feb 7, 2019
CHANGES.md
FUTURE.md
LICENSE.md
README.md Update README.md Dec 7, 2017
_dict.js
_fast-set.js
_list.js fix typo Dec 28, 2017
_map.js
_set.js
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 rebuild collections.min.js Jul 11, 2018
deque.js
dict.js
fast-map.js
fast-set.js
generic-collection.js
generic-map.git.js
generic-map.js fixes a bug that makes map polyfill’s set behaves differently than st… Oct 17, 2016
generic-order.js
generic-set.js
heap.js
iterator.js Some backward compatibility breaking changes: Apr 17, 2016
karma.conf.js
lfu-map.js Some backward compatibility breaking changes: Apr 17, 2016
lfu-set.js Some backward compatibility breaking changes: Apr 17, 2016
list.js
lru-map.js Some backward compatibility breaking changes: Apr 17, 2016
lru-set.js
map.js
minify
multi-map.js fix Constructor Map requires 'new' in MultiMap Jul 11, 2018
package.json
set.js
shim-array.js
shim-function.js
shim-object.js
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
sorted-array.js
sorted-map.js Merge pull request #152 from marchant/fix#149 Jun 8, 2016
sorted-set.js fix sorted-set.reduceRight Mar 20, 2018
tree-log.js
weak-map.js

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)
You can’t perform that action at this time.