Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lagden/unflatten-object

Unflatten a flat object
https://github.com/lagden/unflatten-object

javascript library object unflatten

Last synced: 18 days ago
JSON representation

Unflatten a flat object

Awesome Lists containing this project

README

        

# Unflatten

[![NPM version][npm-img]][npm]
[![Build Status][ci-img]][ci]
[![Coverage Status][coveralls-img]][coveralls]
[![XO code style][xo-img]][xo]

[npm-img]: https://img.shields.io/npm/v/@tadashi/unflatten-object.svg
[npm]: https://www.npmjs.com/package/@tadashi/unflatten-object
[ci-img]: https://github.com/lagden/unflatten-object/actions/workflows/nodejs.yml/badge.svg
[ci]: https://github.com/lagden/unflatten-object/actions/workflows/nodejs.yml
[coveralls-img]: https://coveralls.io/repos/github/lagden/unflatten-object/badge.svg?branch=master
[coveralls]: https://coveralls.io/github/lagden/unflatten-object?branch=master
[xo-img]: https://img.shields.io/badge/code_style-XO-5ed9c7.svg
[xo]: https://github.com/sindresorhus/xo

-----

Unflatten a flat object

## Install

```
$ npm i -S @tadashi/unflatten-object
```

## Usage

```js
import unflatten from '@tadashi/unflatten-object'

const unflat = unflatten({
'a.b.c': 'foo',
'a.d': 'bar'
})
// => {
// a: {
// b: {
// c: 'foo'
// },
// d: 'bar'
// }
// }
```

## License

MIT © [Thiago Lagden](http://lagden.in)