Skip to content

Instantly share code, notes, and snippets.

@aghecht
Created December 21, 2013 20:51
Show Gist options
  • Save aghecht/8074865 to your computer and use it in GitHub Desktop.
Save aghecht/8074865 to your computer and use it in GitHub Desktop.
'method' method from JS the good parts
Function.prototype.method = function (name, func) {
this.prototype[name] = func;
return this;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment