invert-kv
Invert the key/value of an object. Example: `{foo: 'bar'}` → `{bar: 'foo'}`
Last updated 5 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install invert-kv 
SYNC missed versions from official npm registry.

invert-kv

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

Install

$ npm install invert-kv

Usage

import invertKeyValue from 'invert-kv';

invertKeyValue({foo: 'bar', '🦄': '🌈'});
//=> {bar: 'foo', '🌈': '🦄'}

Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Current Tags

  • 4.2.0                                ...           latest (5 years ago)

8 Versions

  • 4.2.0                                ...           5 years ago
  • 4.1.0                                ...           5 years ago
  • 4.0.0                                ...           6 years ago
  • 3.0.1                                ...           7 years ago
  • 3.0.0                                ...           8 years ago
  • 2.0.0                                ...           9 years ago
  • 1.0.0                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
Maintainers (1)
Downloads
Total 19
Today 0
This Week 5
This Month 17
Last Day 2
Last Week 5
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE