anti-db

Plain old JS object that saves itself to disk

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
50Dec 29, 2013Jul 9, 2013Minified + gzip package size for anti-db in KB

Readme

anti-db

Most simple applications, you don't need a database. You need an in-memory object that automatically saves itself to disk.

require('anti-db');

var myobj = _require('myobject.json');
 ==> {}
myobj.hey = 'there';

// no need to call save(), automatically saved to disk on exit ./myobject.json
// automatically loaded in next time

// options - return array instead of object
var myarr = _require('myobject.json', []);
 ==> []
myarr.push(1);

var myobj = _require('myobj.json', null, 10000);
// save to disk every 10 sec. just in case..

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.