Skip to content

Instantly share code, notes, and snippets.

View peutetre's full-sized avatar
in a loop, building momo.coach and audio2text.email

Paul Panserrieu peutetre

in a loop, building momo.coach and audio2text.email
View GitHub Profile
@peutetre
peutetre / annotated.js
Created May 17, 2011 18:36 — forked from madrobby/annotated.js
Unit testing
var test = function(
a, // a object holding test functions
b, // a logging function, taking multiple arguments
c, // placeholder
d, // placeholder
e, // placeholder
f // placeholder
){
c = d = e = 0; // initialize asserts, failures and exception counts to 0
for ( // iterate
@peutetre
peutetre / gist:818157
Created February 9, 2011 08:43
console.log wrapper....
// just working on FF
var log = (function() {
if(window.console && typeof window.console.log === 'function')
return console.log
return function() {}
})();
// idem
if (typeof console == "undefined" || typeof console.log == "undefined") {