Tennessee Gibbs 0304752480 added pages to master | 6 lat temu | |
---|---|---|
.. | ||
index.js | 6 lat temu | |
package.json | 6 lat temu | |
readme.md | 6 lat temu |
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