Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parse-json

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-json - npm Package Compare versions

Comparing version 6.0.2 to 7.0.0

index.d.ts

19

package.json
{
"name": "parse-json",
"version": "6.0.2",
"version": "7.0.0",
"description": "Parse JSON with more helpful errors",

@@ -16,9 +16,10 @@ "license": "MIT",

"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": ">=16"
},
"scripts": {
"test": "xo && nyc ava"
"test": "xo && nyc ava && tsd"
},
"files": [
"index.js",
"index.d.ts",
"vendor"

@@ -38,12 +39,14 @@ ],

"dependencies": {
"@babel/code-frame": "^7.16.0",
"@babel/code-frame": "^7.21.4",
"error-ex": "^1.3.2",
"json-parse-even-better-errors": "^2.3.1",
"lines-and-columns": "^2.0.2"
"json-parse-even-better-errors": "^3.0.0",
"lines-and-columns": "^2.0.3",
"type-fest": "^3.8.0"
},
"devDependencies": {
"ava": "^3.15.0",
"ava": "^5.2.0",
"nyc": "^15.1.0",
"xo": "^0.46.4"
"tsd": "^0.28.1",
"xo": "^0.54.0"
}
}

@@ -14,3 +14,3 @@ # parse-json

```js
import parseJson from 'parse-json';
import parseJson, {JSONError} from 'parse-json';

@@ -55,3 +55,3 @@ const json = '{\n\t"foo": true,\n}';

} catch (error) {
if (error instanceof parseJson.JSONError) {
if (error instanceof JSONError) {
error.fileName = 'foo.json';

@@ -95,3 +95,3 @@ }

### parseJson.JSONError
### JSONError

@@ -111,13 +111,1 @@ Exposed for `instanceof` checking.

The printable section of the JSON which produces the error.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-parse-json?utm_source=npm-parse-json&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc