1.0.0 • Published 7 years ago

json_io v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

JSON IO

Read/write from/to JSON files. Dead-simple async library for people tired of typing JSON.stringify and JSON.parse repeatedly.

Example usage

var jsonIo = require('/path/to/json-io');

jsonIo.writeTo('/tmp/hello.json', {first: 'text', second: 'some more'}, function(cb) {
    if(cb instanceof Error) throw cb;
    console.log('File written succesfully!')
})

jsonIo.read('/tmp/hello.json', function(res) {
    if(res instanceof Error) throw res;
    console.log(res.first, res.second, 'made it!');
})

License

ISC

Author

Alexander Leon