Created
January 8, 2017 21:37
-
-
Save ryanwebjackson/a25f5d955cdd25fa9201e86974aa44de to your computer and use it in GitHub Desktop.
This file contains hidden or 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(thing, doAdditionalStuff) { | |
var originalMethod = thing.method; | |
thing.method = function() { | |
doAdditionalStuff(); | |
return originalMethod.apply(this, arguments); | |
}; | |
})(thingObject, doAdditionalStuffFunction); | |
//Calling out dependencies. | |
//Might also be nice to pass in name of method to modify, if wrapper function stays in place. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment