1.0.0 • Published 7 years ago
json_io v1.0.0
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
1.0.0
7 years ago