Skip to content
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

Get args under mixin #67

Open
MuyBien opened this issue Jan 28, 2017 · 2 comments
Open

Get args under mixin #67

MuyBien opened this issue Jan 28, 2017 · 2 comments

Comments

@MuyBien
Copy link

MuyBien commented Jan 28, 2017

Hi!

I'm trying to make a mixin but I need the args passed to the original methods.
How can I get these?

Thanks.

@raphaelarias
Copy link

Try adding as the data as a key in the validated-method definition.

@Paul-Vandell
Copy link

I know this is late, but it can help some

export const myMixin = function(methodOptions) { 
  const run = methodOptions.run;
  methodOptions.run = function(args) {
    ///You got your args here, do your stuff
  }
  return run.call(this,args) // Don't forget to pass back your run function with your new stuff
}

Hope it helps. 👍

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

No branches or pull requests

3 participants