# unflatten

> The opposite of `flatten`

Latest version **1.0.4** (published 2016-10-13) · ISC license · 0 weekly downloads

## Install

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

## Health

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

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

Negative: high vulnerabilities; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2016-10-13 |
| First published | 2014-05-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 1 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Vigour.io |
| Maintainers | mhernandez, vigour-io |
| Keywords | flatten, unflatten |

## Links

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

## Dependencies (3)

- [bubleify](https://npm.io/package/bubleify.md) ^0.5.1
- [lodash.set](https://npm.io/package/lodash.set.md) ^4.3.1
- [lodash.setwith](https://npm.io/package/lodash.setwith.md) ^4.3.1

## Recent versions

- 1.0.4 (latest) — 2016-10-13
- 1.0.3 — 2016-10-07
- 1.0.2 — 2016-08-08
- 0.0.2 — 2014-06-12
- 0.0.1 — 2014-05-21

## README

# unflatten

<!-- VDOC.badges travis; standard; npm; coveralls -->
<!-- DON'T EDIT THIS SECTION (including comments), INSTEAD RE-RUN `vdoc` TO UPDATE -->
[![Build Status](https://travis-ci.org/vigour-io/unflatten.svg?branch=master)](https://travis-ci.org/vigour-io/unflatten)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![npm version](https://badge.fury.io/js/unflatten.svg)](https://badge.fury.io/js/unflatten)
[![Coverage Status](https://coveralls.io/repos/github/vigour-io/unflatten/badge.svg?branch=master)](https://coveralls.io/github/vigour-io/unflatten?branch=master)

<!-- VDOC END -->

<!-- VDOC.jsdoc unflatten -->
<!-- DON'T EDIT THIS SECTION (including comments), INSTEAD RE-RUN `vdoc` TO UPDATE -->
#### var obj = unflatten(subject, [opts])

Opposite of `flatten-obj`. Unflattens an object with delimited keys
- **subject** (*object*) - Object that needs to be unflattened
- **[opts]** (*object|string|boolean*) - Optional.

- - Provide a string as a shortcut for `{ separator: opts }`

- - Provide a boolean as a shorcut for `{ objectMode: opts }`

- - Provide an object to set both options `{ separator: '/', objectMode: true }`

- Available options:

+ **separator** (*string*) - defaults to `'.'`

+ **objectMode** (*boolean*) - defaults to `false`
- **return** (*object*) obj - Nested Javascript object

<!-- VDOC END -->

```javascript
const unflatten = require('unflatten')
unflatten({
  'a.b.c': 'd'
})
/*
{
  a: {
    b: {
      c: 'd'
    }
  }
}
*/
```

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