Simple (yet) function that make pseudo class creation simple.
Example class:
Class({
clazz: {
clazz: function( smth ){
this.foobar = smth;
,
}foobar: 'default',
getFoobar: function(){
return this.foobar;
}
}
})
= new clazz('123');
foo = new clazz();
bar
alert( foo.getFoobar() );
alert( bar.getFoobar() );
Notice that constructor have same name as class name :) You can download it here.