From e52170108636e8b6d91f899fcb9ea18a64d8eafb Mon Sep 17 00:00:00 2001 From: Abraham Hernandez Date: Fri, 26 Jul 2019 01:05:39 -0400 Subject: [PATCH] adding docs --- readme.md | 67 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/readme.md b/readme.md index e1aa6ff..83a9d49 100644 --- a/readme.md +++ b/readme.md @@ -1,36 +1,28 @@ -

- +

+ + +
-
-
- s-to-o - : STRING TO OBJECT (self explanatory)

-

- - - - - - - - - - - - - - -

+# s-to-o + +> Convert an string into an object -# Install +[![](https://img.shields.io/travis/abranhe/s-to-o.svg?logo=travis)](https://travis-ci.org/abranhe/s-to-o) +[![](https://abranhe.com/badge.svg)](https://github.com/abranhe) +[![](https://cdn.abranhe.com/badges/cash-me.svg)](https://cash.me/$abranhe) +[![](https://cdn.abranhe.com/badges/patreon.svg)](https://patreon.com/abranhe) +[![](https://img.shields.io/github/license/abranhe/s-to-o.svg)](https://github.com/abranhe/s-to-o/blob/master/license) +[![](https://img.shields.io/npm/v/s-to-o.svg)](https://npmjs.com/package/s-to-o) + +## Install ``` npm install s-to-o ``` -# Usage +## Usage ```js const sto = require('s-to-o'); @@ -39,16 +31,27 @@ console.log(sto('a: 1, b: 2, c: 3, d: 4')); // => { a: '1', b: '2', c: '3', d: '4' } ``` -# Related +## API -- [str-to-arr](https://github.com/abranhe/str-to-arr): Add words from a string to an array +### sto(input) + +Type: `function` -# Team +Return Type: `object` -|[![Carlos Abraham Logo](https://avatars3.githubusercontent.com/u/21347264?s=50)](https://abranhe.com)| -| :-: | -| [Carlos Abraham](https://github.com/abranhe) | +A replacement for JSON.parse() which converts an string into an object. + +#### input + +Type: `string` + +String to be parsed. + + +## Related + +- [str-to-arr](https://github.com/abranhe/str-to-arr): Add words from a string to an array -# License +## License -[MIT](https://github.com/abranhe/s-to-o/blob/master/license) License © [Carlos Abraham](https://github.com/abranhe/) +MIT © [Abraham Hernandez](https://abranhe.com)