js-hash-triptex
v1.0.3
Published
This is a simple implementation of hastable in Javascript, no dependencies only 4KB
Downloads
1
Readme
jsHash
This is a simple implementation of hastable in Javascript
Features -
- Automatic loadfactor based hashtable resizing
- Data chaining
- No extra dependecies
- Only 4KB
Installaltion -
Method 1 -
- Clone this repo and use it in your project
Method 2 (NPM)-
- Run this command -
npm i js-hash-triptex
Usage -
const hashtable = require('js-hash-triptex'); //importing the hash
const myTable = new hashtable();
myTable.setItem('firstName', 'Tripto21');
myTable.setItem('lastName', 'Afsin');
myTable.setItem('age', 22);
console.log(myTable.getItem('firstName'));
console.log(myTable.getItem('lastName'));
console.log(myTable.getItem('age'));