Skip to content

Instantly share code, notes, and snippets.

View jccrosby's full-sized avatar
🏠
Working from home

John Crosby jccrosby

🏠
Working from home
View GitHub Profile
@jccrosby
jccrosby / constructor.js
Created July 24, 2012 14:16
RealEyes Coding Standards
function Animal( name, health ) {
this.name = name;
this.health = health;
}
Animal.prototype.eat = function( value ) {
this.health += value;
};
@jccrosby
jccrosby / degrade_quite_console.js
Created July 24, 2012 14:06
Degrade/Quiet console
console = {};
var i, max, funcs = [
'log', 'debug', 'info', 'warn', 'error', 'assert', 'dir', 'dirxml',
'trace', 'group', 'groupCollapsed', 'groupEnd', 'time', 'timeEnd',
'profile', 'profileEnd', 'count'
];
for( i = 0, max = funcs.length; i < max; i++ ) {
console[ funcs[ i ] ] = function(){};
}