# invert-kv

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

Latest version **4.2.0** (published 2022-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install invert-kv
pnpm add invert-kv
yarn add invert-kv
bun add invert-kv
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.2.0 |
| Published | 2022-02-26 |
| First published | 2014-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 37 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | object, key, value, invert, keys, values |

## Links

- npm: https://www.npmjs.com/package/invert-kv
- Repository: https://github.com/sindresorhus/invert-kv
- Homepage: https://github.com/sindresorhus/invert-kv#readme
- Issues: https://github.com/sindresorhus/invert-kv/issues
- Funding: https://github.com/sindresorhus/invert-kv?sponsor=1
- npm.io page: https://npm.io/package/invert-kv

## Recent versions

- 4.2.0 (latest) — 2022-02-26
- 4.1.0 — 2021-09-07
- 4.0.0 — 2021-05-03
- 3.0.1 — 2020-05-15
- 3.0.0 — 2019-04-30
- 2.0.0 — 2018-01-12
- 1.0.0 — 2014-08-13
- 0.1.0 — 2014-06-26

## README

# invert-kv

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

## Install

```
$ npm install invert-kv
```

## Usage

```js
import invertKeyValue from 'invert-kv';

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

---

<div align="center">
	<b>
		<a href="https://tidelift.com/subscription/pkg/npm-invert-kv?utm_source=npm-invert-kv&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
	</b>
	<br>
	<sub>
		Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
	</sub>
</div>

---
_Source: https://npm.io/package/invert-kv · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
