objectflip
v0.3.0
Published
Module to flip an object so keys are values and values are keys.
Readme
objectflip
npmjs module to flip an object so keys are values and values are keys.
Installation
npm install objectflipor
yarn add objectflipUsage
Pass in an object, and returns an object:
import objectflip from "objectflip";
console.log(objectflip({ "Hello": 123, "world": "gary" }));
> { "123": "Hello", "gary": "world" }Useful for creating inverse maps.
