BiMap
A powerful, flexible and efficient JavaScript bidirectional map implementation. Enables fast insertion, search and retrieval of various kinds of data. A BiMap is like a two-sided Javascript object with equally immediate access to both the keys and the values.
Installation
Node: npm install bimap
Browser: link to bimap.js
Basic usage
var bimap = bimap;bimap; // => "value"bimap; // => "key" bimap;bimap; // => ["Paris", "Lyon", "Marseille"]bimap; // => "France"bimap; // => "France"bimap; // => "France" bimap;bimap; // => ["London", "Manchester", "Birmingham"]bimap; // => ["UK", "England"] bimap;bimap;bimap; // => "zero"bimap; // => 1 bimap;bimap; // => 1bimap; // => "a.c.d"