lihai 8d6c751f49 feat: push | 2 gadi atpakaļ | |
---|---|---|
.. | ||
index.js | 2 gadi atpakaļ | |
package.json | 2 gadi atpakaļ | |
readme.md | 2 gadi atpakaļ |
Invert the key/value of an object. Example:
{foo: 'bar'}
→{bar: 'foo'}
$ npm install --save invert-kv
var invertKv = require('invert-kv');
invertKv({foo: 'bar', unicorn: 'rainbow'});
//=> {bar: 'foo', rainbow: 'unicorn'}
MIT © Sindre Sorhus