Skip to content

Instantly share code, notes, and snippets.

@thephilip
Created November 15, 2016 16:32
Show Gist options
  • Save thephilip/db44739f8a9c6cf62dfd3a9072ab5e8c to your computer and use it in GitHub Desktop.
Save thephilip/db44739f8a9c6cf62dfd3a9072ab5e8c to your computer and use it in GitHub Desktop.
Method Implementation
// implements method
if (typeof Function.prototype.method !== "function") {
Function.prototype.method = function (name, implementation) {
this.prototype[name] = implementation;
return this;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment