Skip to content

Instantly share code, notes, and snippets.

// ################################# CLASS
function Class( fn ){
var object = new fn(), nc = fn, superObject;
if(object.hasOwnProperty('initialize')){
fn = object.initialize;
}
if(object.hasOwnProperty('Extends')){
var SuperConstructor = object.Extends;
delete object.Extends();
fn.prototype = new SuperConstructor();