Skip to content

Commit

Permalink
Fixed documentation for ving/utils/fs readJSON and writeJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
rizen committed Jun 6, 2024
1 parent 146863d commit 01307d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ving/docs/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ outline: deep
# Change Log

## June 2024

### 2024-06-06
* Fixed documentation for ving/utils/fs readJSON and writeJSON

### 2024-06-01
* Documented noSetAll() attribute in Ving Schemas.

## May 2024
Expand Down
4 changes: 2 additions & 2 deletions ving/utils/fs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const sanitize = (filename) => {
* @param {String} path
* @returns {object}
* @example
* async readJSON('./ving.json')
* await readJSON('./ving.json')
*/
export const readJSON = async (path) => {
return JSON.parse(await fs.promises.readFile(path));
Expand All @@ -51,7 +51,7 @@ export const readJSON = async (path) => {
* @param {string} path
* @param {object} data
* @example
* async writeJSON('./ving.json')
* await writeJSON('./ving.json')
*/
export const writeJSON = async (path, data) => {
await fs.promises.writeFile(path, JSON.stringify(data, undefined, 2));
Expand Down

0 comments on commit 01307d1

Please sign in to comment.