{"_id":"json-parse-even-better-errors","_rev":"4081098","name":"json-parse-even-better-errors","description":"JSON.parse with context information on error","dist-tags":{"latest":"5.0.0"},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"time":{"modified":"2025-10-28T01:30:05.000Z","created":"2019-09-27T20:02:57.669Z","5.0.0":"2025-10-22T15:25:51.261Z","4.0.0":"2024-09-04T21:51:17.624Z","3.0.2":"2024-05-04T01:10:21.736Z","3.0.1":"2023-11-28T00:18:51.370Z","3.0.0":"2022-10-10T20:43:22.939Z","2.3.1":"2020-09-02T16:37:58.371Z","2.3.0":"2020-08-20T18:02:55.630Z","2.2.0":"2020-03-05T06:20:43.895Z","2.1.0":"2020-03-05T06:02:58.186Z","2.0.1":"2019-09-27T20:12:23.983Z","2.0.0":"2019-09-27T20:02:57.669Z"},"users":{},"author":{"name":"GitHub Inc."},"repository":{"type":"git","url":"git+https://github.com/npm/json-parse-even-better-errors.git"},"versions":{"5.0.0":{"name":"json-parse-even-better-errors","version":"5.0.0","description":"JSON.parse with context information on error","main":"lib/index.js","scripts":{"test":"tap","snap":"tap","lint":"npm run eslint","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run eslint -- --fix","posttest":"npm run lint","eslint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""},"repository":{"type":"git","url":"git+https://github.com/npm/json-parse-even-better-errors.git"},"keywords":["JSON","parser"],"author":{"name":"GitHub Inc."},"license":"MIT","devDependencies":{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.27.1","tap":"^16.3.0"},"tap":{"check-coverage":true,"nyc-arg":["--exclude","tap-snapshots/**"]},"engines":{"node":"^20.17.0 || >=22.9.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.27.1","publish":true},"gitHead":"ceb17416dd2d7b27a1d8983ce72b78ad33bb320b","_id":"json-parse-even-better-errors@5.0.0","bugs":{"url":"https://github.com/npm/json-parse-even-better-errors/issues"},"homepage":"https://github.com/npm/json-parse-even-better-errors#readme","_nodeVersion":"22.20.0","_npmVersion":"11.6.2","dist":{"shasum":"93c89f529f022e5dadc233409324f0167b1e903e","size":4485,"noattachment":false,"key":"/json-parse-even-better-errors/-/json-parse-even-better-errors-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-parse-even-better-errors/download/json-parse-even-better-errors-5.0.0.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:81004c3d-a27a-42f7-a842-20a21d713263"}},"directories":{},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/json-parse-even-better-errors_5.0.0_1761146751085_0.8389742140275769"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-10-22T15:25:51.261Z","publish_time":1761146751261,"_source_registry_name":"default","_cnpm_publish_time":1761146751261},"4.0.0":{"name":"json-parse-even-better-errors","version":"4.0.0","description":"JSON.parse with context information on error","main":"lib/index.js","scripts":{"test":"tap","snap":"tap","lint":"npm run eslint","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run eslint -- --fix","posttest":"npm run lint","eslint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""},"repository":{"type":"git","url":"git+https://github.com/npm/json-parse-even-better-errors.git"},"keywords":["JSON","parser"],"author":{"name":"GitHub Inc."},"license":"MIT","devDependencies":{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.3","tap":"^16.3.0"},"tap":{"check-coverage":true,"nyc-arg":["--exclude","tap-snapshots/**"]},"engines":{"node":"^18.17.0 || >=20.5.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.23.3","publish":true},"_id":"json-parse-even-better-errors@4.0.0","gitHead":"23c08d07f9e5a8e4ee28fdbbd04027fa914d581a","bugs":{"url":"https://github.com/npm/json-parse-even-better-errors/issues"},"homepage":"https://github.com/npm/json-parse-even-better-errors#readme","_nodeVersion":"22.8.0","_npmVersion":"10.8.3","dist":{"shasum":"d3f67bd5925e81d3e31aa466acc821c8375cec43","size":4483,"noattachment":false,"key":"/json-parse-even-better-errors/-/json-parse-even-better-errors-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-parse-even-better-errors/download/json-parse-even-better-errors-4.0.0.tgz"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"directories":{},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-parse-even-better-errors_4.0.0_1725486677483_0.3321408821034748"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-09-04T21:51:17.624Z","publish_time":1725486677624,"_source_registry_name":"default","_cnpm_publish_time":1725486677624},"3.0.2":{"name":"json-parse-even-better-errors","version":"3.0.2","description":"JSON.parse with context information on error","main":"lib/index.js","scripts":{"test":"tap","snap":"tap","lint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run lint -- --fix","posttest":"npm run lint"},"repository":{"type":"git","url":"git+https://github.com/npm/json-parse-even-better-errors.git"},"keywords":["JSON","parser"],"author":{"name":"GitHub Inc."},"license":"MIT","devDependencies":{"@npmcli/eslint-config":"^4.0.0","@npmcli/template-oss":"4.22.0","tap":"^16.3.0"},"tap":{"check-coverage":true,"nyc-arg":["--exclude","tap-snapshots/**"]},"engines":{"node":"^14.17.0 || ^16.13.0 || >=18.0.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.22.0","publish":true},"_id":"json-parse-even-better-errors@3.0.2","gitHead":"9355df83b4ce4567711823fc1b40fe63dbeebba5","bugs":{"url":"https://github.com/npm/json-parse-even-better-errors/issues"},"homepage":"https://github.com/npm/json-parse-even-better-errors#readme","_nodeVersion":"22.1.0","_npmVersion":"10.7.0","dist":{"shasum":"b43d35e89c0f3be6b5fbbe9dc6c82467b30c28da","size":4488,"noattachment":false,"key":"/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-parse-even-better-errors/download/json-parse-even-better-errors-3.0.2.tgz"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"directories":{},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-parse-even-better-errors_3.0.2_1714785021560_0.5415957225383701"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-05-04T01:10:21.736Z","publish_time":1714785021736,"_source_registry_name":"default","_cnpm_publish_time":1714785021736},"3.0.1":{"name":"json-parse-even-better-errors","version":"3.0.1","description":"JSON.parse with context information on error","main":"lib/index.js","scripts":{"test":"tap","snap":"tap","lint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run lint -- --fix","posttest":"npm run lint"},"repository":{"type":"git","url":"git+https://github.com/npm/json-parse-even-better-errors.git"},"keywords":["JSON","parser"],"author":{"name":"GitHub Inc."},"license":"MIT","devDependencies":{"@npmcli/eslint-config":"^4.0.0","@npmcli/template-oss":"4.20.0","tap":"^16.3.0"},"tap":{"check-coverage":true,"nyc-arg":["--exclude","tap-snapshots/**"]},"engines":{"node":"^14.17.0 || ^16.13.0 || >=18.0.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.20.0","publish":true},"_id":"json-parse-even-better-errors@3.0.1","gitHead":"cbdd5271b6596b9b2388e4ebe46a74eb5595eda3","bugs":{"url":"https://github.com/npm/json-parse-even-better-errors/issues"},"homepage":"https://github.com/npm/json-parse-even-better-errors#readme","_nodeVersion":"18.18.2","_npmVersion":"10.2.4","dist":{"shasum":"02bb29fb5da90b5444581749c22cedd3597c6cb0","size":4440,"noattachment":false,"key":"/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-parse-even-better-errors/download/json-parse-even-better-errors-3.0.1.tgz"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"directories":{},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-parse-even-better-errors_3.0.1_1701130731204_0.1939731469991628"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-11-28T00:18:51.370Z","publish_time":1701130731370,"_source_registry_name":"default","_cnpm_publish_time":1701130731370},"3.0.0":{"name":"json-parse-even-better-errors","version":"3.0.0","description":"JSON.parse with context information on error","main":"lib/index.js","scripts":{"test":"tap","snap":"tap","lint":"eslint \"**/*.js\"","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run lint -- --fix","posttest":"npm run lint"},"repository":{"type":"git","url":"git+https://github.com/npm/json-parse-even-better-errors.git"},"keywords":["JSON","parser"],"author":{"name":"GitHub Inc."},"license":"MIT","devDependencies":{"@npmcli/eslint-config":"^3.1.0","@npmcli/template-oss":"4.5.1","tap":"^16.3.0"},"tap":{"check-coverage":true,"nyc-arg":["--exclude","tap-snapshots/**"]},"engines":{"node":"^14.17.0 || ^16.13.0 || >=18.0.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.5.1"},"gitHead":"22f0dea71d4d2bd6e0151817e7b995a729b88c2e","bugs":{"url":"https://github.com/npm/json-parse-even-better-errors/issues"},"homepage":"https://github.com/npm/json-parse-even-better-errors#readme","_id":"json-parse-even-better-errors@3.0.0","_nodeVersion":"18.10.0","_npmVersion":"8.19.2","dist":{"shasum":"2cb2ee33069a78870a0c7e3da560026b89669cf7","size":4303,"noattachment":false,"key":"/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-parse-even-better-errors/download/json-parse-even-better-errors-3.0.0.tgz"},"_npmUser":{"name":"lukekarrys","email":"luke@lukekarrys.com"},"directories":{},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-parse-even-better-errors_3.0.0_1665434602733_0.46747380475622125"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-10-11T08:27:32.454Z","publish_time":1665434602939,"_cnpm_publish_time":1665434602939},"2.3.1":{"name":"json-parse-even-better-errors","version":"2.3.1","description":"JSON.parse with context information on error","main":"index.js","scripts":{"preversion":"npm t","postversion":"npm publish","prepublishOnly":"git push --follow-tags","test":"tap","snap":"tap"},"repository":{"type":"git","url":"git+https://github.com/npm/json-parse-even-better-errors.git"},"keywords":["JSON","parser"],"author":{"name":"Kat Marchán","email":"kzm@zkat.tech"},"license":"MIT","devDependencies":{"tap":"^14.6.5"},"tap":{"check-coverage":true},"gitHead":"74c9a7e27cf4884568c8e956f37f5911f1cbec8f","bugs":{"url":"https://github.com/npm/json-parse-even-better-errors/issues"},"homepage":"https://github.com/npm/json-parse-even-better-errors#readme","_id":"json-parse-even-better-errors@2.3.1","_nodeVersion":"14.8.0","_npmVersion":"7.0.0-beta.8","dist":{"shasum":"7c47805a94319928e05777405dc12e1f7a4ee02d","size":4553,"noattachment":false,"key":"/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-parse-even-better-errors/download/json-parse-even-better-errors-2.3.1.tgz"},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-parse-even-better-errors_2.3.1_1599064678245_0.9212850466046945"},"_hasShrinkwrap":false,"publish_time":1599064678371,"_cnpm_publish_time":1599064678371},"2.3.0":{"name":"json-parse-even-better-errors","version":"2.3.0","description":"JSON.parse with context information on error","main":"index.js","scripts":{"preversion":"npm t","postversion":"npm publish","prepublishOnly":"git push --follow-tags","test":"tap","snap":"tap"},"repository":{"type":"git","url":"git+https://github.com/npm/json-parse-even-better-errors.git"},"keywords":["JSON","parser"],"author":{"name":"Kat Marchán","email":"kzm@zkat.tech"},"license":"MIT","devDependencies":{"tap":"^14.6.5"},"tap":{"check-coverage":true},"gitHead":"004d34c961d2763a5da34c803a973cb1dd34dc26","bugs":{"url":"https://github.com/npm/json-parse-even-better-errors/issues"},"homepage":"https://github.com/npm/json-parse-even-better-errors#readme","_id":"json-parse-even-better-errors@2.3.0","_nodeVersion":"14.8.0","_npmVersion":"7.0.0-beta.5","dist":{"shasum":"371873c5ffa44304a6ba12419bcfa95f404ae081","size":4427,"noattachment":false,"key":"/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-parse-even-better-errors/download/json-parse-even-better-errors-2.3.0.tgz"},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-parse-even-better-errors_2.3.0_1597946575507_0.9568389077725838"},"_hasShrinkwrap":false,"publish_time":1597946575630,"_cnpm_publish_time":1597946575630},"2.2.0":{"name":"json-parse-even-better-errors","version":"2.2.0","description":"JSON.parse with context information on error","main":"index.js","scripts":{"preversion":"npm t","postversion":"npm publish","prepublishOnly":"git push --follow-tags","test":"tap","snap":"tap"},"repository":{"type":"git","url":"git+https://github.com/npm/json-parse-even-better-errors.git"},"keywords":["JSON","parser"],"author":{"name":"Kat Marchán","email":"kzm@zkat.tech"},"license":"MIT","devDependencies":{"tap":"^14.6.5"},"tap":{"check-coverage":true},"gitHead":"7cbe266abff557e443e528b6ec2ef39900836cfe","bugs":{"url":"https://github.com/npm/json-parse-even-better-errors/issues"},"homepage":"https://github.com/npm/json-parse-even-better-errors#readme","_id":"json-parse-even-better-errors@2.2.0","_nodeVersion":"13.9.0","_npmVersion":"6.14.2","dist":{"shasum":"304d29aa54bb01156a1328c454034ff0ac8a7bf4","size":3689,"noattachment":false,"key":"/json-parse-even-better-errors/-/json-parse-even-better-errors-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-parse-even-better-errors/download/json-parse-even-better-errors-2.2.0.tgz"},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-parse-even-better-errors_2.2.0_1583389243769_0.6382174691017821"},"_hasShrinkwrap":false,"publish_time":1583389243895,"_cnpm_publish_time":1583389243895},"2.1.0":{"name":"json-parse-even-better-errors","version":"2.1.0","description":"JSON.parse with context information on error","main":"index.js","scripts":{"preversion":"npm t","postversion":"npm publish","postpublish":"git push --follow-tags","test":"tap","snap":"tap"},"repository":{"type":"git","url":"git+https://github.com/npm/json-parse-even-better-errors.git"},"keywords":["JSON","parser"],"author":{"name":"Kat Marchán","email":"kzm@zkat.tech"},"license":"MIT","devDependencies":{"tap":"^14.6.5"},"tap":{"check-coverage":true},"gitHead":"24d475d7987bc28ff3172fa3378b2cbf4b02aa95","bugs":{"url":"https://github.com/npm/json-parse-even-better-errors/issues"},"homepage":"https://github.com/npm/json-parse-even-better-errors#readme","_id":"json-parse-even-better-errors@2.1.0","_nodeVersion":"13.9.0","_npmVersion":"6.14.2","dist":{"shasum":"a72dffaa47924e65fbfe8368d0424bd686076b82","size":3543,"noattachment":false,"key":"/json-parse-even-better-errors/-/json-parse-even-better-errors-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-parse-even-better-errors/download/json-parse-even-better-errors-2.1.0.tgz"},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-parse-even-better-errors_2.1.0_1583388178074_0.0038880499319304818"},"_hasShrinkwrap":false,"publish_time":1583388178186,"_cnpm_publish_time":1583388178186},"2.0.1":{"name":"json-parse-even-better-errors","version":"2.0.1","description":"JSON.parse with context information on error","main":"index.js","scripts":{"preversion":"npm t","postversion":"npm publish","postpublish":"git push --follow-tags","test":"tap","snap":"tap"},"repository":{"type":"git","url":"git+https://github.com/npm/json-parse-even-better-errors.git"},"keywords":["JSON","parser"],"author":{"name":"Kat Marchán","email":"kzm@zkat.tech"},"license":"MIT","devDependencies":{"tap":"^14.6.5"},"tap":{"check-coverage":true},"gitHead":"7037a936cf0fcde35473a9a00bb987535e7ada76","bugs":{"url":"https://github.com/npm/json-parse-even-better-errors/issues"},"homepage":"https://github.com/npm/json-parse-even-better-errors#readme","_id":"json-parse-even-better-errors@2.0.1","_nodeVersion":"12.8.1","_npmVersion":"6.11.3","dist":{"shasum":"ed0009e0f5e7eb21ae0675d0d34782cc7a53c60e","size":3245,"noattachment":false,"key":"/json-parse-even-better-errors/-/json-parse-even-better-errors-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-parse-even-better-errors/download/json-parse-even-better-errors-2.0.1.tgz"},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-parse-even-better-errors_2.0.1_1569615143740_0.6561319283993847"},"_hasShrinkwrap":false,"publish_time":1569615143983,"_cnpm_publish_time":1569615143983},"2.0.0":{"name":"json-parse-even-better-errors","version":"2.0.0","description":"JSON.parse with context information on error","main":"index.js","scripts":{"preversion":"npm t","postversion":"npm publish","postpublish":"git push --follow-tags","test":"tap","snap":"tap"},"repository":{"type":"git","url":"git+https://github.com/npm/json-parse-even-better-errors.git"},"keywords":["JSON","parser"],"author":{"name":"Kat Marchán","email":"kzm@zkat.tech"},"license":"MIT","devDependencies":{"tap":"^14.6.5"},"tap":{"check-coverage":true},"gitHead":"56f2af8f93c19ade11f4cfb2d47232e8e4fc6fa1","bugs":{"url":"https://github.com/npm/json-parse-even-better-errors/issues"},"homepage":"https://github.com/npm/json-parse-even-better-errors#readme","_id":"json-parse-even-better-errors@2.0.0","_nodeVersion":"12.8.1","_npmVersion":"6.11.3","dist":{"shasum":"20adeb0d829d7a576c8b14487546fb4998420f0a","size":3200,"noattachment":false,"key":"/json-parse-even-better-errors/-/json-parse-even-better-errors-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-parse-even-better-errors/download/json-parse-even-better-errors-2.0.0.tgz"},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-parse-even-better-errors_2.0.0_1569614577520_0.7998008755295973"},"_hasShrinkwrap":false,"publish_time":1569614577669,"_cnpm_publish_time":1569614577669}},"readme":"# json-parse-even-better-errors\n\n[`json-parse-even-better-errors`](https://github.com/npm/json-parse-even-better-errors)\nis a Node.js library for getting nicer errors out of `JSON.parse()`,\nincluding context and position of the parse errors.\n\nIt also preserves the newline and indentation styles of the JSON data, by\nputting them in the object or array in the `Symbol.for('indent')` and\n`Symbol.for('newline')` properties.\n\n## Install\n\n`$ npm install --save json-parse-even-better-errors`\n\n## Table of Contents\n\n* [Example](#example)\n* [Features](#features)\n* [Contributing](#contributing)\n* [API](#api)\n  * [`parse`](#parse)\n\n### Example\n\n```javascript\nconst parseJson = require('json-parse-even-better-errors')\n\nparseJson('\"foo\"') // returns the string 'foo'\nparseJson('garbage') // more useful error message\nparseJson.noExceptions('garbage') // returns undefined\n```\n\n### Features\n\n* Like JSON.parse, but the errors are better.\n* Strips a leading byte-order-mark that you sometimes get reading files.\n* Has a `noExceptions` method that returns undefined rather than throwing.\n* Attaches the newline character(s) used to the `Symbol.for('newline')`\n  property on objects and arrays.\n* Attaches the indentation character(s) used to the `Symbol.for('indent')`\n  property on objects and arrays.\n\n## Indentation\n\nTo preserve indentation when the file is saved back to disk, use\n`data[Symbol.for('indent')]` as the third argument to `JSON.stringify`, and\nif you want to preserve windows `\\r\\n` newlines, replace the `\\n` chars in\nthe string with `data[Symbol.for('newline')]`.\n\nFor example:\n\n```js\nconst txt = await readFile('./package.json', 'utf8')\nconst data = parseJsonEvenBetterErrors(txt)\nconst indent = Symbol.for('indent')\nconst newline = Symbol.for('newline')\n// .. do some stuff to the data ..\nconst string = JSON.stringify(data, null, data[indent]) + '\\n'\nconst eolFixed = data[newline] === '\\n' ? string\n  : string.replace(/\\n/g, data[newline])\nawait writeFile('./package.json', eolFixed)\n```\n\nIndentation is determined by looking at the whitespace between the initial\n`{` and `[` and the character that follows it.  If you have lots of weird\ninconsistent indentation, then it won't track that or give you any way to\npreserve it.  Whether this is a bug or a feature is debatable ;)\n\n### API\n\n#### <a name=\"parse\"></a> `parse(txt, reviver = null, context = 20)`\n\nWorks just like `JSON.parse`, but will include a bit more information when\nan error happens, and attaches a `Symbol.for('indent')` and\n`Symbol.for('newline')` on objects and arrays.  This throws a\n`JSONParseError`.\n\n#### <a name=\"parse\"></a> `parse.noExceptions(txt, reviver = null)`\n\nWorks just like `JSON.parse`, but will return `undefined` rather than\nthrowing an error.\n\n#### <a name=\"jsonparseerror\"></a> `class JSONParseError(er, text, context = 20, caller = null)`\n\nExtends the JavaScript `SyntaxError` class to parse the message and provide\nbetter metadata.\n\nPass in the error thrown by the built-in `JSON.parse`, and the text being\nparsed, and it'll parse out the bits needed to be helpful.\n\n`context` defaults to 20.\n\nSet a `caller` function to trim internal implementation details out of the\nstack trace.  When calling `parseJson`, this is set to the `parseJson`\nfunction.  If not set, then the constructor defaults to itself, so the\nstack trace will point to the spot where you call `new JSONParseError`.\n","_attachments":{},"homepage":"https://github.com/npm/json-parse-even-better-errors#readme","bugs":{"url":"https://github.com/npm/json-parse-even-better-errors/issues"},"license":"MIT"}