Awesome
then-parse-json
Gracefully parse JSON using promises - promisified JSON.parse
Install
npm i then-parse-json --save
npm test
Usage
For more use-cases see the tests
var JSONParse = require('then-parse-json')
JSONParse('{"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-stringify-json: Gracefully stringify JSON using promises - promisified JSON.stringify
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.