quick-store

quick-store =========== Quick JSON storage for NodeJS server, using localStorage syntax with a few added. Async. ```` var db = require('quick-store')(); // saved file ./db.json var db = require('quick-store')('./mydb.json'); // saved file ./mydb.json

npm install quick-store
14 downloads in the last week
30 downloads in the last month

quick-store

Quick JSON storage for NodeJS server, using localStorage syntax with a few added. Async.

var db = require('quick-store')();                // saved file ./db.json
var db = require('quick-store')('./mydb.json');   // saved file ./mydb.json

db.setItem('key', 'value', function(o){
   // {key: 'value'}
})

db.getItem('key', function(v){
   // v === value
})

db.removeItem('key', function(v){
   // {}
})

db.put({key2: 'val2'}, function(){
   // put entire object to file
})

db.get(function(o){
   // get entire object
})

db.clear(function(){
  //  {}
}

db.change('./newdb.json'); 
// use a new file
npm loves you