# unflatten-recursive

> Unflattens object recursively while preserving arrays. Contents of arrays are also unflattened.

Latest version **1.0.1** (published 2017-07-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install unflatten-recursive
pnpm add unflatten-recursive
yarn add unflatten-recursive
bun add unflatten-recursive
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-07-12 |
| First published | 2017-07-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | drawyan |
| Keywords | convert, conversion, string, start, case |

## Links

- npm: https://www.npmjs.com/package/unflatten-recursive
- Repository: https://github.com/UrbanCompass/unflatten-recursive
- Homepage: https://github.com/UrbanCompass/unflatten-recursive#readme
- Issues: https://github.com/UrbanCompass/unflatten-recursive/issues
- npm.io page: https://npm.io/package/unflatten-recursive

## Dependencies (1)

- [flat](https://npm.io/package/flat.md) ^2.0.1

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-07-12
- 1.0.0 — 2017-07-12

## README

# unflatten-recursive [![CircleCI](https://circleci.com/gh/UrbanCompass/unflatten-recursive.svg?style=shield)](https://circleci.com/gh/UrbanCompass/unflatten-recursive)

Unflattens object recursively while preserving arrays. Contents of arrays are unflattened.

Note: UNLIKE OTHER OPEN SOURCE LIB such as `flat`, this lib also loops through arrays and unflattens
the array members recursively.

Input:
```
  {
     'key.nestedKey': 'value',
     'key.arr': [{a : 'a'}, 1, {'arrKey.nestedArrKey': 'arrValue'}]
  }
```
 Output:
```
  {
    key: {
      nestedKey: 'value',
      arr: [{a: 'a'}, 1, {arrKey: {nestedArrKey: 'arrValue'}}]
    }
  }
```

For more examples see test/spec.js

## Installation
```
npm install --save unflatten-recursive
```

## Usage
```js
import unflattenRecursive from 'unflatten-recursive';

unflattenRecursive({
  'a.b.c': 'something'
}); // {a: {b: {c: 'something'}}}
unflattenRecursive({
  'a.b': [
    {'c.d': 'nested'}
  ]
}); // {a: {b: [{c: {d: 'nested'}}]}}
```

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