Algorithms in JavaScript
npm install cs.js
The only data structure that is available right now is Stack
. Avaiable methods are clear()
, isEmpty()
, peek()
, push()
, size()
, toString()
. More will added in time.
// es5
const Stack = require('cs.js');
// es6
import Stack from 'cs.js';
const stack = new Stack();
stack.isEmpty(); // will return true
npm test
Pull requests are welcome! Please make sure that any new or changed functionality need to have unit tests accompanied with the PR. Make sure that you lint (npm run lint
) and test your code (npm test
).