Awesome
then-stringify-json
Gracefully stringify JSON using promises - promisified JSON.stringify
Install
npm i then-stringify-json --save
npm test
Usage
For more use-cases see the tests
var JSONStringify = require('then-stringify-json')
JSONStringify({foo: 'bar'})
.then(function (res) {
console.log(res)
//=> '{"foo":"bar"}'
})
.catch(console.error)
Related
- bluebird: Full featured Promises/A+ implementation with exceptionally good performance
- make-callback: Make synchronous function to support callback api
- promise: Bare bones Promises/A+ implementation
- try-read-json: Fast, meaningful and correct try/catch flow for reading JSON with JSON.parse - support optional callback
- then-parse-json: Gracefully parse JSON using promises - promisified JSON.parse
- then-read-json: Read JSON file using promises
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.