shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
writeJsonSync
Type:Function
Status:stable
Since:1.0.0
Platform:node
@blackbyte.sugar.node.fs
Write a JSON file. If don’t exist, will be created as well as the directory structure if needed… (sync)
Params
- path*-String
The file path to write
- object*-String
The object to write in the JSON file
- options{}Object
Options are what you’d pass to [fs.writeJsonSync()](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback)
Example
import { writeJsonSync } from '@blackbyte/sugar/fs';
writeJsonSync('my/cool/file.json', { hello: 'world' });Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space