1.0.1 • Published 6 years ago
@v0id/json.io v1.0.1
Install
npm i @v0id/json.io
yarn add @v0id/json.io
Usage
JSON gets auto saved whenever you delete or set property
By default if you don't change default fallback json the file will be never written to disk
import jsonIO from '@v0id/json.io';
// { hello: 'world' } is default fallback json if file doesn't exist
const json = new jsonIO('./test/tmp/12345678', { hello: 'world' });
// read value
console.log(json.hello);
// change value
json.hello = 'me';
// create value
json.world = 'hello';
// delete value
delete json.world;