A simple implementation of a Hashmap written in JavaScript.
HM is a simple implementation of a Hashmap written in JavaScript.
Features:
- Written in ES6, transpiled using Babel
- Statically type checked with Flow (https://flow.org/)
- 100% code coverage
OS X & Linux:
npm install node-hm --save
import HM from 'node-hm'
// Initialize with size of hashmap
var hm = new HM(10);
hm.set("key", "value") // => true
hm.get("key") // => "value"
hm.delete("key") // => "value"
hm.get("key") // => null
hm.load() // => 0.1
Requirements
- Install Node.js (https://nodejs.org/en/download/)
To install developer dependencies, run:
npm install
To execute linting, type checking, and run tests, run:
npm run test
- 1.0.1
- First and final release
- Fork it (https://github.com/helloworld/node-hm)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request