invert-kv
TypeScript icon, indicating that this package has built-in type declarations

4.2.0 • Public • Published

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 4.2.0
    506
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 4.2.0
    506
  • 4.1.0
    1
  • 4.0.0
    1
  • 3.0.1
    309,439
  • 3.0.0
    3,459
  • 2.0.0
    1,762,097
  • 1.0.0
    3,251,000
  • 0.1.0
    38

Package Sidebar

Install

npm i invert-kv

Weekly Downloads

5,326,541

Version

4.2.0

License

MIT

Unpacked Size

3.33 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus