node-hm
v1.0.1
Published
[![npm package](https://nodei.co/npm/node-hm.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/node-hm/)
Downloads
3
Readme
node-hm
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
Installation
OS X & Linux:
npm install node-hm --save
Usage example
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
Development setup
Requirements
- Install Node.js (https://nodejs.org/en/download/)
To install developer dependencies, run:
npm install
Testing
To execute linting, type checking, and run tests, run:
npm run test
Release History
- 1.0.1
- First and final release
Contributing
- 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