0.1.1 • Published 12 years ago

persistent-harmony v0.1.1

Weekly downloads
-
License
-
Repository
github
Last release
12 years ago

persistent-harmony

A node.js wrapper class to create persistent javascript objects, relying on harmony proxies.

Installation

npm install persistent-harmony

Usage

var ph = require("persistent-harmony");
new ph.MongoPH({/* default mongodb args */}, function(mongoPH){
	var mymap = mongoPH.wrap("mymap", {/* empty object instance */}, function(){
		console.log("mymap is now synchronized to its mongodb collection");
		mymap.first = "coucou"; // => stored as {_id:"first", v:"coucou"} in mongodb
		console.log("myapp", mymap);
	});
});

Don't forget to add the --harmony-proxies when starting node!

node --harmony-proxies tests.js
0.1.1

12 years ago

0.1.01

12 years ago

0.1.0

12 years ago