1.0.2 • Published 7 years ago
json-file-util v1.0.2
Json file util
Utility to read and write json file. Install with:
npm install json-file-util
Json file utility read
and write
methods returns Promise
instances. Simple usage instructions:
const util = require('json-file-util');
util.read('tests/package.json').then((config) => {
expect(config.version).toEqual('0.0.1');
});
const data = { name: 'data', version: '0.0.3' };
util.write('tests/temporary.json', data).then((length) => {
expect(length).toEqual(33);
});