@gershy/compound-map
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

CompoundMap

Makes it easy to map an unordered set of arbitrary values to a value!

let cm = new CompoundMap({ width: 3 });
let key1 = {};
let key2 = [];
let key3 = /abc/i;

cm.set([ key1, key2, key3 ], 'lol');

console.log(cm.get([ key1, key2, key3 ])); // lol
console.log(cm.get([ key3, key1, key2 ])); // lol
console.log(cm.get([ key1, key2, key2 ])); // undefined

Readme

Keywords

none

Package Sidebar

Install

npm i @gershy/compound-map

Weekly Downloads

0

Version

1.0.5

License

ISC

Unpacked Size

41.4 kB

Total Files

12

Last publish

Collaborators

  • gershy