Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yujinlim/object-to-string
parse object to human readable string
https://github.com/yujinlim/object-to-string
Last synced: 15 days 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 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-26T03:35:39.000Z (almost 10 years ago)
- Last Synced: 2024-11-07T18:03:58.300Z (2 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 [![Build Status](http://img.shields.io/travis/yujinlim/object-to-string.svg?style=flat-square)](https://travis-ci.org/yujinlim/object-to-string) [![Dependency Status](http://img.shields.io/gemnasium/yujinlim/object-to-string.svg?style=flat-square)](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)