Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: update variable name
  • Loading branch information
rishabh3112 committed Jun 5, 2019
1 parent 8609b2b commit 8e3f4ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/utils/ast-utils.ts
Expand Up @@ -5,18 +5,18 @@ function isImportPresent(j: JSCodeshift, ast: Node, path: string): boolean {
if (typeof path !== "string") {
throw new Error(`path parameter should be string, recieved ${typeof path}`);
}
let isPresent = false;
let importExists = false;
ast.find(j.CallExpression).forEach(
(callExp: Node): void => {
if (
(callExp.value as Node).callee.name === "require" &&
(callExp.value as Node).arguments[0].value === path
) {
isPresent = true;
importExists = true;
}
}
);
return isPresent;
return importExists;
}

/**
Expand Down

0 comments on commit 8e3f4ae

Please sign in to comment.