Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (13 sloc) 378 Bytes

JSONStore

Simple json store for node. Saves changes on disk immediately and blocking, so only relevant for cli applications and such.

Usage

var JSONStore = require('json-store');
var db = JSONStore('./index.json');

db.set('foo', 'bar');
db.get('foo');                // bar

db.set('obj', {foo: 'bar'});
db.get('obj').foo             // bar