try-parse-json
JSON.parse() wrapped in a try catch. Returns any error instead of throwing.
Usage
var tryParseJSON = ; // {a:1, b:2}
Errors
message // 'Unexpected token ]'
JSON.parse() wrapped in a try catch. Returns any error instead of throwing.
var tryParseJSON = ; // {a:1, b:2}
message // 'Unexpected token ]'
npm i try-parse-json
358
1.0.2
MIT