js-hash-triptex

1.0.3 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i js-hash-triptex

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

5.07 kB

Total Files

3

Last publish

Collaborators

  • triptex