try-parse-json for javascript
npm install try-parse-jsonJSON.parse() wrapped in a try catch. Returns any error instead of throwing.
``javascript
var tryParseJSON = require('try-parse-json');
tryParseJSON('{"a": 1, "b": 2}') // {a:1, b:2}
`
`javascript``
tryParseJSON('[1, 2, 3,]').message // 'Unexpected token ]'