Skip to content

Commit 0b6da36

Browse files
committed
document BOM handling and noExceptions method better
1 parent 05963ae commit 0b6da36

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ getting nicer errors out of `JSON.parse()`, including context and position of th
2020
```javascript
2121
const parseJson = require('json-parse-even-better-errors')
2222

23-
parseJson('"foo"')
23+
parseJson('"foo"') // returns the string 'foo'
2424
parseJson('garbage') // more useful error message
25+
parseJson.noExceptions('garbage') // returns undefined
2526
```
2627

2728
### Features
2829

2930
* Like JSON.parse, but the errors are better.
31+
* Strips a leading byte-order-mark that you sometimes get reading files.
32+
* Has a `noExceptions` method that returns undefined rather than throwing.
3033

3134
### API
3235

0 commit comments

Comments
 (0)