https://github.com/yujinlim/object-to-string
parse object to human readable string
https://github.com/yujinlim/object-to-string
Last synced: 9 months ago
JSON representation
parse object to human readable string
- Host: GitHub
- URL: https://github.com/yujinlim/object-to-string
- Owner: yujinlim
- License: mit
- Created: 2015-01-26T03:04:48.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-26T03:35:39.000Z (almost 11 years ago)
- Last Synced: 2024-12-29T03:55:16.898Z (11 months ago)
- Language: JavaScript
- Size: 344 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Object to String [](https://travis-ci.org/yujinlim/object-to-string) [](https://gemnasium.com/yujinlim/object-to-string)
> parse object to human readable string
## Install
```
npm install --save object-to-string
```
## Usage
```js
var objectToString = require('object-to-string');
var result = objectToString({ foo: 'bar', hello: 'world'}, { keySeparator: ':', attrSeparator: ',' });
//=> foo: bar, hello: world
```
## API
### objectToString(input, options)
return parsed string from object
#### input
*Required*
Type: `object`
object to parse
#### options
Type: `object`
Parsing parameters
#### options.keySeparator
Type: `String`
separator between key and value
#### options.attrSeparator
Type: `String`
separator between attributes
## License
MIT © [Yu Jin Lim](https://github.com/yujinlim)