<commit_before>var Firebase = require('firebase');
var Zz = require('./lib/mapper.js');
var ref = new Firebase('https://sagavera.firebaseio.com');
var blueprint = {
  prop1: null,
  prop2: null,
  prop3: "default"
};


var x = new Zz.Model(ref.child('test'), 'test/me', blueprint);

x.write();
x.on('written', function(){
	console.log("data written");
});

x.__wlocal('prop1');

setTimeout(function(){ 
	x.prop1= Math.random(); 
	console.log("assigned x.prop1", x.prop1);
}, 2000)

setTimeout(function(){ 
	x.prop1="tadada"; 
	console.log("assigned x.prop1", x);
	console.log(JSON.stringify(x));
}, 4000)

console.log(x);<commit_msg>sample<commit_after>var Firebase = require('firebase');
var Zz = require('./lib/mapper.js');
var ref = new Firebase('https://sagavera.firebaseio.com');
var blueprint = {
  prop1: null,
  prop2: null,
  prop3: "default"
};


var x = new Zz.Model(ref.child('test'), 'test/me', blueprint);

x.write();
x.on('written', function(){
	console.log("data written");
});

x.__wlocal('prop1');

setTimeout(function(){ 
	x.prop1= Math.random(); 
	console.log("assigned x.prop1", x.prop1);
}, 2000)

setTimeout(function(){ 
	x.prop1="tadada"; 
	console.log("assigned x.prop1", x);
	console.log(JSON.stringify(x));
}, 4000)

x.__watch_remote("prop1", "child_changed");

setTimeout(function(){ 
	x.prop1="tadada"; 
	console.log("assigned x.prop1", x);
	console.log(JSON.stringify(x));
}, 10000)

console.log(x);
{'fraction_non_alphanumeric': 0.21553533939818054, 'fraction_numerical': 0.02939118264520644, 'mean_word_length': 5.217391304347826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2386348', 'n_tokens_mistral': 579, 'n_tokens_neox': 545, 'n_words': 98}