then-parse-json

Gracefully parse JSON using promises - promisified JSON.parse

Usage no npm install needed!

<script type="module">
  import thenParseJson from 'https://cdn.skypack.dev/then-parse-json';
</script>

README

then-parse-json npmjs.com The MIT License

Gracefully parse JSON using promises - promisified JSON.parse

code climate standard code style travis build status coverage status dependency status

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.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckoCore.tk keybase tunnckoCore tunnckoCore npm tunnckoCore twitter tunnckoCore github