Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/lagden/unflatten-object
- Owner: lagden
- License: mit
- Created: 2018-12-19T23:59:57.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-14T21:53:10.000Z (almost 2 years ago)
- Last Synced: 2024-04-10T13:35:24.602Z (9 months ago)
- Topics: javascript, library, object, unflatten
- Language: Shell
- Homepage:
- Size: 844 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)