Skip to content

Commit

Permalink
Fix readJSON docs (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
zcei authored and SBoudrias committed Mar 31, 2018
1 parent 2c0ad36 commit 052403e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ By default, calling `read()` on a file path that does not exist throws error. Yo

Read a file and parse its contents as JSON.

`readJSON()` internally calls `read()` and will throw error if the file path you pass in does not exist. But if you pass in an optional `defaults`, the `defaults` content will be returned in case of the target file is missing, instead of throwing error (error would still be thrown if JSON.parse failed to parse your target file).
`readJSON()` internally calls `read()` but will not throw an error if the file path you pass in does not exist. If you pass in an optional `defaults`, the `defaults` content will be returned in case of the target file is missing, instead of `undefined`. (Error would still be thrown if `JSON.parse` failed to parse your target file.)

### `#write(filepath, contents)`

Expand Down

0 comments on commit 052403e

Please sign in to comment.