Last active
August 29, 2015 14:12
-
-
Save creaux/65031de2d93b255c3ce2 to your computer and use it in GitHub Desktop.
Allows to add new method to classes with chaining functionality.
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
Function.prototype.method = function(name, fn) { | |
this.prototype[name] = fn; | |
return this; | |
} |
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
name: Method helper | |
description: Allows to add new method to classes with chaining functionality | |
authors: | |
- Petr Juna | |
resources: | |
- Design Patterns | |
normalize_css: no | |
wrap: b | |
panel_js: 0 | |
panel_css: 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment