No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

writeJson-sync.md 495 B

hace 3 años
123456789101112131415161718192021
  1. # writeJsonSync(file, object, [options])
  2. Writes an object to a JSON file. `options` are the same that
  3. you'd pass to [`jsonFile.writeFileSync()`](https://github.com/jprichardson/node-jsonfile#writefilesyncfilename-obj-options).
  4. **Alias:** `writeJSONSync()`
  5. - `file` `<String>`
  6. - `object` `<Object>`
  7. - `options` `<Object>`
  8. ## Example:
  9. ```js
  10. const fs = require('fs-extra')
  11. fs.writeJsonSync('./package.json', {name: 'fs-extra'})
  12. ```
  13. ---
  14. **See also:** [`outputJsonSync()`](outputJson-sync.md)