key-map 🔜
When you remove duplicates in a collection mapped by keys, you may want to keep track of old keys and their new equivalent.
Installing
npm install key-map
Usage
const keyMap = const m = m // -> 'a'm // -> 'b'm // -> 'c' m // map c to bm // map b to a m // -> 'a'm // -> 'a'm // -> 'a'
Contributing
If you have a question, found a bug or want to propose a feature, have a look at the issues page.