flatten-unflatten
Flatten or unflatten a object
Table of Contents
Install
This project uses node and npm.
$ npm install flatten-unflatten$ # OR $ yarn add flatten-unflatten
Usage
const foo = bar: 5 baz: bar: 1 foo: ping: 'pong' arr: 1 3 4 5 const flatFoo = console // {bar: 5, baz.bar: 1, baz.foo.ping: "pong", baz.foo.arr: Array[4]} const starryFlatFoo = console // {bar: 5, baz*bar: 1, baz*foo*ping: "pong", baz*foo*arr: Array[4]}console // {bar: 5, baz.bar: 1, baz.foo.ping: "pong", baz.foo.arr.0: 1, baz.foo.arr.1: 3…} console // {bar: 5, baz: Object}console // {bar: 5, baz: Object}
Contribute
- Fork it and create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request
License
MIT