Skip to content

Instantly share code, notes, and snippets.

@stolksdorf
Created January 14, 2014 17:54
Show Gist options
  • Save stolksdorf/8422636 to your computer and use it in GitHub Desktop.
Save stolksdorf/8422636 to your computer and use it in GitHub Desktop.
Just a test Gist
This is simply a test
== HOW DU
Archetype = archetype ={
initialize : function(){
return this;
},
create : function(){
var obj = this.extend();
obj.deep('initialize').apply(obj, arguments);
obj.trigger('created', obj); //remove? test with presto
return obj;
},
extend : function(methods){
var obj = Object.create(this);
obj.events = obj._events.bind({storedEvents : []});
return obj.mixin(methods);
},
mixin : function(methods){
for(var methodName in methods){
this[methodName] = methods[methodName];
}
return this;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment