Socket
Socket
Sign inDemoInstall

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.0 to 6.0.1

8

index.js

@@ -1,9 +0,6 @@

import {createRequire} from 'node:module';
import errorEx from 'error-ex';
import fallback from 'json-parse-even-better-errors';
import {codeFrameColumns} from '@babel/code-frame';
import LinesAndColumns from 'lines-and-columns';
const require = createRequire(import.meta.url);
const {default: LinesAndColumns} = require('lines-and-columns');
export const JSONError = errorEx('JSONError', {

@@ -37,3 +34,4 @@ fileName: errorEx.append('in %s'),

if (indexMatch && indexMatch.length > 0) {
const lines = new LinesAndColumns(string);
// eslint-disable-next-line new-cap
const lines = new LinesAndColumns.default(string);
const index = Number(indexMatch[1]);

@@ -40,0 +38,0 @@ const location = lines.locationForIndex(index);

{
"name": "parse-json",
"version": "6.0.0",
"version": "6.0.1",
"description": "Parse JSON with more helpful errors",

@@ -5,0 +5,0 @@ "license": "MIT",

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