Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
IonicaBizau committed Apr 26, 2016
1 parent 5a9bff4 commit 34061f5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 11 deletions.
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Expand Up @@ -59,6 +59,8 @@ Contributions are more than welcome!

Thanks! :sweat_smile:



[1]: https://github.com/IonicaBizau/obj-unflatten/issues

[2]: https://github.com/IonicaBizau/code-style
[2]: https://github.com/IonicaBizau/code-style
14 changes: 14 additions & 0 deletions DOCUMENTATION.md
@@ -0,0 +1,14 @@
## Documentation

You can see below the API reference of this module.

### `unflattenObject(flatten, separator)`
Convert flatten objects in nested ones.

#### Params
- **Object** `flatten`: The flatten object that should be converted.
- **Object** `separator`: The field separator (default: `"."`).

#### Return
- **Object** Unflatten object

26 changes: 16 additions & 10 deletions README.md
@@ -1,14 +1,18 @@

# obj-unflatten [![PayPal](https://img.shields.io/badge/%24-paypal-f39c12.svg)][paypal-donations] [![Version](https://img.shields.io/npm/v/obj-unflatten.svg)](https://www.npmjs.com/package/obj-unflatten) [![Downloads](https://img.shields.io/npm/dt/obj-unflatten.svg)](https://www.npmjs.com/package/obj-unflatten) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github)

> Convert flatten objects in nested ones.
## Installation
## :cloud: Installation

```sh
$ npm i --save obj-unflatten
```

## Example

## :clipboard: Example



```js
const unflatten = require("obj-unflatten");
Expand All @@ -29,7 +33,8 @@ console.log(unflatten({
// { name: { first: 'Johnny', last: 'B.' }, age: 20 }
```

## Documentation
## :memo: Documentation


### `unflattenObject(flatten, separator)`
Convert flatten objects in nested ones.
Expand All @@ -41,17 +46,18 @@ Convert flatten objects in nested ones.
#### Return
- **Object** Unflatten object

## How to contribute
Have an idea? Found a bug? See [how to contribute][contributing].

## Where is this library used?
If you are using this library in one of your projects, add it in this list. :sparkles:

## Related
## :yum: How to contribute
Have an idea? Found a bug? See [how to contribute][contributing].

## :sparkles: Related

- [`obj-flatten`](https://github.com/IonicaBizau/obj-flatten) – Convert nested objects in flatten ones.

## License


## :scroll: License

[MIT][license] © [Ionică Bizău][website]

Expand All @@ -61,4 +67,4 @@ If you are using this library in one of your projects, add it in this list. :spa
[license]: http://showalicense.com/?fullname=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica%40gmail.com%3E%20(http%3A%2F%2Fionicabizau.net)&year=2016#license-mit
[website]: http://ionicabizau.net
[contributing]: /CONTRIBUTING.md
[docs]: /DOCUMENTATION.md
[docs]: /DOCUMENTATION.md

0 comments on commit 34061f5

Please sign in to comment.