Daniel Hübleitner 615619e6e7 start werk | 5 years ago | |
---|---|---|
.. | ||
index.js | 5 years ago | |
license | 5 years ago | |
package.json | 5 years ago | |
readme.md | 5 years ago |
Invert the key/value of an object. Example:
{foo: 'bar'}
→{bar: 'foo'}
$ npm install invert-kv
const invertKv = require('invert-kv');
invertKv({foo: 'bar', unicorn: 'rainbow'});
//=> {bar: 'foo', rainbow: 'unicorn'}
MIT © Sindre Sorhus