parse-json
Advanced tools
Comparing version 6.0.0 to 6.0.1
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5443
42