|
hace 3 semanas | |
---|---|---|
.. | ||
index.d.ts | hace 3 semanas | |
index.js | hace 3 semanas | |
license | hace 3 semanas | |
package.json | hace 3 semanas | |
readme.md | hace 3 semanas |
Invert the key/value of an object. Example:
{foo: 'bar'}
→{bar: 'foo'}
$ npm install invert-kv
const invertKeyValue = require('invert-kv');
invertKeyValue({foo: 'bar', '🦄': '🌈'});
//=> {bar: 'foo', '🌈': '🦄'}