@onesy/hash-table
v1.0.0
Published
Hash table
Downloads
63
Maintainers
Readme
Getting started
Add
yarn add @onesy/hash-table
Use cases
- Indexing data
- Caching
- Storage for data, for efficient quering
- Storing relationships between data
- etc.
Use
import OnesyHashTable from '@onesy/hash-table';
// Make a new hash table instance
const onesyHashTable = new OnesyHashTable();
// Add values
onesyHashTable.set('a', 14).set('a1', 114);
onesyHashTable.get('a');
// 14
onesyHashTable.get('a14');
// undefined
// Remove
onesyHashTable.remove('a');
// true
onesyHashTable.get('a');
// undefined
Dev
Install
yarn
Test
yarn test
Prod
Build
yarn build