1 # json-parse-helpfulerror
3 A drop-in replacement for `JSON.parse` that uses
4 <https://npmjs.org/jju> to provide more useful error messages in the
5 event of a parse error.
12 npm i -S json-parse-helpfulerror
18 var jph = require('json-parse-helpfulerror');
20 var notJSON = "{'foo': 3}"; // keys must be double-quoted in JSON
22 JSON.parse(notJSON); // throws unhelpful error
24 jph.parse("{'foo': 3}") // throws more helpful error: "Unexpected token '\''..."