@cjser/invert-kv
v4.2.0-cjser.2
Published
Invert the key/value of an object. Example: `{foo: 'bar'}` → `{bar: 'foo'}`
Maintainers
Readme
invert-kv
Invert the key/value of an object. Example:
{foo: 'bar'}→{bar: 'foo'}
Install
$ npm install invert-kvUsage
import invertKeyValue from 'invert-kv';
invertKeyValue({foo: 'bar', '🦄': '🌈'});
//=> {bar: 'foo', '🌈': '🦄'}cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/invert-kv
