Template with some useful utilities. Particulary a log function that is more userful than the post function
Based on code from uncle-javascript.com.
autowatch = 1;
inlets = 1;
outlets = 1;
var debug = true;
// Utilities
function exists(data){
return(data !== null && data !== undefined);
}
function log() {
if(typeof(debug) != "boolean" || (typeof(debug) == "boolean" && debug === true)){
for(var i=0,len=arguments.length; i= 0) {
s = JSON.stringify(message);
}
post(s);
}
else if(message === null) {
post("");
}
else {
post(message);
}
}
post("\n");
}
}