package
A drop-in replacement for JSON.parse that uses `jju` to give helpful errors
npm install json-parse-helpfulerrorGitHub-flavored package documentation.
Across all versions, last 30 days.
18,313,459 in 30 days
Runtime metadata.
Tagged topics.
A drop-in replacement for JSON.parse that uses
https://npmjs.org/jju to provide more useful error messages in the
event of a parse error.
npm i -S json-parse-helpfulerrorvar jph = require('json-parse-helpfulerror');
var notJSON = "{'foo': 3}"; // keys must be double-quoted in JSON
JSON.parse(notJSON); // throws unhelpful error
jph.parse("{'foo': 3}") // throws more helpful error: "Unexpected token '\''..."MIT
isaacs
i@izs.me
Estimated unpacked size across 2 packages.
68.7 kB
Includes dependencies.