Skip to content

Add $dume, execute on method #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

camflint
Copy link

@camflint camflint commented Apr 8, 2014

Allows an arbitrary callback to be invoked prior to the real method executing.

I added this out of a desire to log a custom message when the method is invoked, instead of the default behavior of $duml. I could envision it being used for other things, so I'm submitting it here.

* allows an arbitrary callback to be invoked prior to the real method
executing.
@@ -186,17 +189,20 @@ function wrapMethod(object, methodName, isLog) {
var slice = [].slice;
var replacement;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we're streamlining the functions into one, let's just do function replacement

@amasad
Copy link
Owner

amasad commented Apr 18, 2014

this looks good, just couple of comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants