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

pass debug as argument of function #1

Open
abernov opened this issue Jun 22, 2020 · 1 comment
Open

pass debug as argument of function #1

abernov opened this issue Jun 22, 2020 · 1 comment

Comments

@abernov
Copy link

abernov commented Jun 22, 2020

import Debug from 'debug';
const debug = Debug('debug1');
function mm() {};
mm(debug, args);

at now result after plugin is:

function mm() {};

must be:

function mm() {};
mm(()=>{}, args);

In same function "debug" can be passed as one of the arguments, the function call does not need to be canceled!

Please add support for require('debug')

@abernov
Copy link
Author

abernov commented Jun 22, 2020

need to replace string №124
from
if (p.parentPath.isCallExpression()) {
to

if (p.parentPath.isCallExpression() && p.parentPath.node.callee.name === user.node.id.name) {

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

1 participant