Skip to content

Commit eff48eb

Browse files
committed
Update docs for throws option
1 parent 44386e7 commit eff48eb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ jsonfile.readFile(file, function(err, obj) {
4444

4545
### readFileSync(filename, [options])
4646

47-
`options` (`object`, default `undefined`): Pass in any `fs.readFileSync` options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
48-
- `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, throw the error.
49-
If `false`, returns `null` for the object.
47+
`options` (`object`, default `undefined`): Pass in any `fs.readFileSync` options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
48+
- `throws` (`boolean`, default: `true`). If an error is encountered reading or parsing the file, throw the error. If `false`, returns `null` for the object.
5049

5150
```js
5251
var jsonfile = require('jsonfile')

0 commit comments

Comments
 (0)