-
-
Save felippe-regazio/2c374ec2c93ba13f4ce226e2c5cec1aa to your computer and use it in GitHub Desktop.
Revisions
-
tilmanschweitzer revised this gist
Oct 20, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,9 +5,9 @@ function interceptFunction (object, fnName, options) { var after = options.after || noop; object[fnName] = function () { before.apply(this, arguments); var result = fnToWrap.apply(this, arguments); after.apply(this, arguments); return result } } -
tilmanschweitzer revised this gist
Oct 20, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,8 @@ function interceptFunction (object, fnName, options) { object[fnName] = function () { before.apply(object, arguments); var result = fnToWrap.apply(object, arguments); after.apply(object, arguments); return result } } -
tilmanschweitzer revised this gist
Oct 20, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,8 @@ function interceptFunction (object, fnName, options) { var after = options.after || noop; object[fnName] = function () { before.apply(object, arguments); fnToWrap.apply(object, arguments); after.apply(object, arguments); } } -
Tilman Potthof created this gist
Jan 21, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ function interceptFunction (object, fnName, options) { var noop = function () {}; var fnToWrap = object[fnName]; var before = options.before || noop; var after = options.after || noop; object[fnName] = function () { before(); fnToWrap.apply(object, arguments); after(); } }