Skip to content

coderaiser/node-writejson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

writejson License NPM version Dependency Status Build Status

Write stringified object to file.

Install

npm i writejson --save

How to use?

var writejson = require('writejson');

writejson('data.json', {hello: 'world'}, function(error) {
    if (error)
        console.error(error.message);
});

try {
    writejson.sync('data.json', {hello: 'world'});
} catch(error) {
    console.log(error.message);
}

writejson.sync.try('data.json', {hello: 'world'});

License

MIT

About

write stringified object to file

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors