It would be nice if there is an option for pretty-printing JSON while writing file.
There is an option; it's called spaces.
fs.writeJson(file, {some: 'data'}, {spaces: 2})
.then(() => {
console.log('success!')
})
.catch(err => {
console.error(err)
})
This should be documented.
Most helpful comment
There is an option; it's called
spaces.This should be documented.