Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 429 Bytes

writeJson-sync.md

File metadata and controls

17 lines (11 loc) · 429 Bytes

writeJsonSync(file, object, [options])

Writes an object to a JSON file. options are the same that you'd pass to jsonFile.writeFileSync().

Alias: writeJSONSync()

Example:

const fs = require('fs-extra')

fs.writeJsonSync('./package.json', {name: 'fs-extra'})

See also: outputJsonSync()