iterable-keyed-map
This package is a Typescript-rewriting of anko/array-keyed-map. With some additional tweakings and features.
import { IterableKeyedMap } from "iterable-keyed-map";
const ikmap = new IterableKeyedMap<string, string | number>();
ikmap.set(["1", "2", "3"], 1);
ikmap.set(["1", "2"], 2);
ikmap.set(["3", "2", "1"], "random string");
console.log(ikmap.get(["1", "2"]));
console.log(ikmap.get(["1", "2", "3"]));
console.log(ikmap.get(["3", "2", "1"]));
console.log([...ikmap]);
ikmap.delete(["1", "2"]);
console.log([...ikmap]);
Features
Todos