o2file
v1.0.0
Published
Creates a filebacked mirrored object
Downloads
1
Readme
o2file
File backed JavaScript objects (or changes you make to objects will be reflected in a file of your choosing).
Useful for log objects where you need to automatically persist changes you make to objects.
Install & Usage
npm install o2file --save
const o2file = require("o2file");
o2file.init("myfile", opts).then((obj) => {
// use obj here
// when done using object, will not destroy the object provided but stop writing changes to filename
o2file.destroy("myfile");
});