json-try-parse

1.0.0 • Public • Published

json-try-parse

Try to parse json, or return undefined. I just wrote this too many times so it had to become a module

Install

npm install json-try-parse --save

Example

var tryParse = require('json-try-parse');
 
var obj = tryParse('{ "hello": "there" }');
 
console.log(obj.hello);
// "there"

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    188
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    188

Package Sidebar

Install

npm i json-try-parse

Weekly Downloads

115

Version

1.0.0

License

MIT

Last publish

Collaborators

  • jcrugzz