# invert-association

> key -> association to each in association as key -> key as value

Latest version **1.0.1** (published 2016-04-16) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-04-16 |
| First published | 2015-08-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | james@womack.io |
| Maintainers | jameswomack |
| Keywords | array, invert, key, association, swap, functional, utility, map, hash |

## Links

- npm: https://www.npmjs.com/package/invert-association
- Repository: https://github.com/jameswomack/node-invert-association
- Homepage: https://github.com/jameswomack/node-invert-association#readme
- Issues: https://github.com/jameswomack/node-invert-association/issues
- npm.io page: https://npm.io/package/invert-association

## Dependencies (3)

- [amp-is-array](https://npm.io/package/amp-is-array.md) 1.0.1
- [amp-is-object](https://npm.io/package/amp-is-object.md) 1.0.1
- [amp-is-string](https://npm.io/package/amp-is-string.md) 1.0.1

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-04-16
- 1.0.0 — 2015-08-03

## README

# invert-association
key -> array to each in array as key -> key as value

## Installation
```
npm i invert-association -SE
```

## Testing
```
npm test
```

## Basic Example
```
invertAssoc({
  series: [ 'episode', 'season', 'creator' ]
}) 
// -> { episode: 'series', season: 'series', creator: 'series' }
```

## Impetus
The purpose of this module is to tranform a set of one-to-many associations
into a set of many-to-one relationships. Areas that this can be useful are:
* DAOs
* Validators
* Serializers

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