/ archiveofbelonging.org / back / node_modules / json-parse-better-errors /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[   ]package.json2 years ago2.2K7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك]
[   ]index.js39 years ago1.1K 
[TXT]README.md39 years ago2.1Kf12eb36 documentaiton updates [كارل مبارك]
[TXT]LICENSE.md39 years ago1.0K7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك]
[TXT]CHANGELOG.md39 years ago1.2K 
README.md

json-parse-better-errors npm version license Travis AppVeyor Coverage Status

json-parse-better-errors is a Node.js library for getting nicer errors out of JSON.parse(), including context and position of the parse errors.

Install

$ npm install --save json-parse-better-errors

Table of Contents

Example

const parseJson = require('json-parse-better-errors')

parseJson('"foo"')
parseJson('garbage') // more useful error message

Features

Contributing

The npm team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The Contributor Guide has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear.

All participants and maintainers in this project are expected to follow Code of Conduct, and just generally be excellent to each other.

Please refer to the Changelog for project history details, too.

Happy hacking!

API

> parse(txt, ?reviver, ?context=20)

Works just like JSON.parse, but will include a bit more information when an error happens.

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80