0.1.3 • Published 11 years ago

jellybin v0.1.3

Weekly downloads
10
License
-
Repository
github
Last release
11 years ago

#JSON-DB

lightweight JSONDatabase with automatically syncing to disk.

If json file change, jellybin automatically reload json file.

##Usage

var jellybin = require("jellybin");

var db = jellybin("data.json");

db.set("jelly", { 
	name : "jelly",
	description : "A sweet, clear, semisolid, somewhat elastic spread or preserve made from fruit juice and sugar boiled to a thick consistency.",
	taste : "sweet"
}, function(err){
	console.log("save complete");
});

//get data
var data = db.get("jelly");

//find element with query
data = db.find({ taste : "sweet"});

//also save entire json
db.save({ 
	jelly : {
		name : "jelly"
	}
});

//and load it.
db.load(function(err, data){
	console.dir(data);
});
0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago