1.0.3 • Published 3 years ago

js-hash-triptex v1.0.3

Weekly downloads
5
License
ISC
Repository
github
Last release
3 years ago

jsHash

This is a simple implementation of hastable in Javascript

Features -

  1. Automatic loadfactor based hashtable resizing
  2. Data chaining
  3. No extra dependecies
  4. Only 4KB

Installaltion -

Method 1 -

  1. Clone this repo and use it in your project

Method 2 (NPM)-

  1. 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'));