Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const jsonfile = require('jsonfile')
const file = '/tmp/data.json'
const obj = {name: 'JP'}
const errorLoggerFunction = (err) => console.error(err);
jsonfile.writeFile(file, obj, errorLoggerFunction)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment