Hash table
Very simple code Modern code Junior friendly Typescript Made with 💛
yarn add @amaui/hash-table
- Indexing data
- Caching
- Storage for data, for efficient quering
- Storing relationships between data
- etc.
import AmauiHashTable from '@amaui/hash-table';
// Make a new hash table instance
const amauiHashTable = new AmauiHashTable();
// Add values
amauiHashTable.set('a', 14).set('a1', 114);
amauiHashTable.get('a');
// 14
amauiHashTable.get('a14');
// undefined
// Remove
amauiHashTable.remove('a');
// true
amauiHashTable.get('a');
// undefined
Install
yarn
Test
yarn test
Build
yarn build