Created
November 15, 2016 16:32
-
-
Save thephilip/db44739f8a9c6cf62dfd3a9072ab5e8c to your computer and use it in GitHub Desktop.
Method Implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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