node-storage
Simple file based store for node.js. Useful for storing configs and such on something like an embedded system.
npm install node-storage
Examples:
var Storage = ; // this will synchronously create storage file and any necessary directories// or just load an existing filevar store = 'path/to/file'; // persistence to disk is queued on every put()store; // storage object is kept in memory for quick accessstore; // 'world' // for convenience, you can use dot notation for accessing objects when doing get/putstore; // undefined // here, 'nested' object is created, but only if it didn't previously exist,// in which case 'numbers' key is just added to the objectstore;store; // [1, 2, 3] // throws 'nested.numbers is not an object' errorstore; store;store; // { numbers: [1, 2, 3], primes: [7, 11, 13] } store;store; // 'world'storeobjecthello; // 'world' // remove also queues storage object to be persisted to diskstore;store; // undefinedstore; // undefinedstore; // {}