Skip to content

About

npmjs module to flip an object so keys and values are identical, takes an object with keys and returns object with keys and values set identically

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

objectflip

npmjs module to flip an object so keys are values and values are keys.

Installation

npm install objectflip

or

yarn add objectflip

Usage

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.

About

npmjs module to flip an object so keys and values are identical, takes an object with keys and returns object with keys and values set identically

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages