opj

1.0.0 • Public • Published

opj

persistant objects, that are loaded from and on change saved back to a file.

usage

 
var opj = require("opj");
 
var data = opj("/save/file.json", { // path to savefile
    init: {},      // initial object, if no save file exists
    debounce: 100, // time in ms between saves to debounce multiple changes
});
 
data.words = [];
data.words.push("hello");
data.words.push("world");
 
console.log(data);
 

Package Sidebar

Install

npm i opj

Weekly Downloads

1

Version

1.0.0

License

Unlicense

Unpacked Size

3.17 kB

Total Files

3

Last publish

Collaborators

  • yetzt