Algorithms and Data Structures in JavaScript
In my continuing effort to become more proficient with both TDD and algorithms, I'm setting up this repo to be my dumping ground for algorithms implemented in JavaScript. I use Mocha / Chai as the testing framework.
This collection exists as an academic exercise for myself, and for anyone who might want to see how another software engineer might implement these algorithms in JavaScript. I'd caution against using them in production code; I'd bet you can find more performant implementations elsewhere.
Installation
In your project: $ npm install --save compscijs
To use them:
var compscijs = require('compscijs');
var graph = new compscijs.Graph();
Documentation
More documentation about the code is available at:
$ open node_modules/compscijs/docs/index.html
Development
$ npm install
To run the tests:
$ npm test
I'm also using this repo to experiment with automated documentation generation for ES6 classes. I'm currently using esdocs for this. To generate the docs:
$ npm run docgen
To view the documentation:
$ npm run docs
(Or you can just open docs/index.html in your favorite browser.)