# flatten2

> Recursively flatten JavaScript objects

Latest version **1.1.0** (published 2018-04-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install flatten2
pnpm add flatten2
yarn add flatten2
bun add flatten2
```

## 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.1.0 |
| Published | 2018-04-05 |
| First published | 2016-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 129.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joel Colucci |
| Maintainers | joelcolucci |
| Keywords | flatten, nested, objects, recursion |

## Links

- npm: https://www.npmjs.com/package/flatten2
- Homepage: https://github.com/joelcolucci/flatten2
- Issues: https://github.com/joelcolucci/flatten2/issues
- npm.io page: https://npm.io/package/flatten2

## Recent versions

- 1.1.0 (latest) — 2018-04-05
- 1.0.0 — 2018-03-21
- 0.2.1 — 2018-02-26
- 0.2.0 — 2016-12-13
- 0.1.1 — 2016-10-04
- 0.1.0 — 2016-10-01

## README

# flatten2
> Recursively flatten JavaScript objects.

Zero dependencies.

## Installation
```
# NPM
npm install flatten2 --save

# Yarn
yarn add flatten2
```

## Example Input/Output
Input
```javascript
{
    "team": {
        "name": "patriots",
        "coach": "bill belichick",
        "players": {
            "quarterback": "tom brady"
        }
    }
}
```

Output
```javascript
{
    "team/name": "patriots",
    "team/coach": "bill belichick",
    "team/players/quarterback": "tom brady"
}
```

## Getting started
### Flatten a single object
```javascript
import { flatten } from 'flatten2';

var myObject = {...}

var myFlattenedObject = flatten(myObject);
```

### Flatten each object within an Array
```javascript
import { flattenMany } from 'flatten2';

var myArrayOfObjects = [
    {...},
    {...},
    {...}
];

var myArrayOfFlattenedObjects = flattenMany(myArrayOfObjects);
```

## API Reference
Coming soon..

## Contributing
Coming soon..

## License
MIT License Copyright (c) 2018 Joel Colucci

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