setup-node/node_modules/invert-kv
eric sciple 2b95e76931 .
2020-01-24 12:20:19 -05:00
..
index.js . 2020-01-24 12:20:19 -05:00
license . 2020-01-24 12:20:19 -05:00
package.json . 2020-01-24 12:20:19 -05:00
readme.md . 2020-01-24 12:20:19 -05:00

invert-kv Build Status

Invert the key/value of an object. Example: {foo: 'bar'}{bar: 'foo'}

Install

$ npm install invert-kv

Usage

const invertKv = require('invert-kv');

invertKv({foo: 'bar', unicorn: 'rainbow'});
//=> {bar: 'foo', rainbow: 'unicorn'}

License

MIT © Sindre Sorhus