This commit is contained in:
2023-11-02 02:38:40 +04:00
parent ad418f41e6
commit 82846fc0bb
9778 changed files with 1191953 additions and 52 deletions

29
lab3/node_modules/json-parse-helpfulerror/README.md generated vendored Normal file
View File

@@ -0,0 +1,29 @@
# json-parse-helpfulerror
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.
# Example
## Installation
```
npm i -S json-parse-helpfulerror
```
## Use
```js
var 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 '\''..."
```
# License
MIT