diff --git a/docs/outputJson-sync.md b/docs/outputJson-sync.md index cab6316b..13c214d1 100644 --- a/docs/outputJson-sync.md +++ b/docs/outputJson-sync.md @@ -1,13 +1,15 @@ # outputJsonSync(file, object, [options]) Almost the same as [`writeJsonSync`](writeJson-sync.md), except that if the directory does not exist, it's created. -`options` are what you'd pass to [`jsonFile.writeFileSync()`](https://github.com/jprichardson/node-jsonfile#writefilesyncfilename-obj-options). **Alias:** `outputJSONSync()` - `file` `` - `object` `` - `options` `` + - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. + - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) + - Also accepts [`fs.writeFileSync` options](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) ## Example: diff --git a/docs/outputJson.md b/docs/outputJson.md index fc6f2fe5..d3fbe670 100644 --- a/docs/outputJson.md +++ b/docs/outputJson.md @@ -1,13 +1,15 @@ # outputJson(file, object, [options, callback]) Almost the same as [`writeJson`](writeJson.md), except that if the directory does not exist, it's created. -`options` are what you'd pass to [`jsonFile.writeFile()`](https://github.com/jprichardson/node-jsonfile#writefilefilename-options-callback). **Alias:** `outputJSON()` - `file` `` - `object` `` - `options` `` + - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. + - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) + - Also accepts [`fs.writeFile` options](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) - `callback` `` ## Example: diff --git a/docs/writeJson-sync.md b/docs/writeJson-sync.md index 9e649bbc..d2a3ef64 100644 --- a/docs/writeJson-sync.md +++ b/docs/writeJson-sync.md @@ -1,13 +1,15 @@ # writeJsonSync(file, object, [options]) -Writes an object to a JSON file. `options` are the same that -you'd pass to [`jsonFile.writeFileSync()`](https://github.com/jprichardson/node-jsonfile#writefilesyncfilename-obj-options). +Writes an object to a JSON file. **Alias:** `writeJSONSync()` - `file` `` - `object` `` - `options` `` + - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. + - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) + - Also accepts [`fs.writeFileSync` options](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) ## Example: diff --git a/docs/writeJson.md b/docs/writeJson.md index 0e9c3931..af94ffc5 100644 --- a/docs/writeJson.md +++ b/docs/writeJson.md @@ -1,13 +1,15 @@ # writeJson(file, object, [options, callback]) -Writes an object to a JSON file. `options` are the same that -you'd pass to [`jsonFile.writeFile()`](https://github.com/jprichardson/node-jsonfile#writefilefilename-options-callback). +Writes an object to a JSON file. **Alias:** `writeJSON()` - `file` `` - `object` `` - `options` `` + - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. + - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) + - Also accepts [`fs.writeFile` options](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) - `callback` `` ## Example: