Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
fs-extra JSON spaces bug
node v6.17.1
endpoint
share
tweet
const assert = require('assert') const fs = require('fs-extra') fs.spaces = 4 const data = { a: 1, b: 2 } fs.outputJsonSync('test.json', data) assert.equal(fs.readFileSync('test.json', 'utf8'), JSON.stringify(data, null, 4))
Loading…
no comments
sign in
to comment