File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/utilities/var/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export function isInitializedFromSource(
34
34
}
35
35
// check for: `variable = require('source')` or `variable = require('source').variable`
36
36
return F . pipe (
37
- getRequireExpressionArgument ( init ) ,
37
+ getRequireExpressionArguments ( init ) ,
38
38
O . flatMapNullable ( ( args ) => args [ 0 ] ) ,
39
39
O . filter ( AST . isStringLiteral ) ,
40
40
// check for: `require('source')` or `require('source/...')`
@@ -45,7 +45,7 @@ export function isInitializedFromSource(
45
45
return isMatching ( { type : "ImportDeclaration" , source : { value : source } } , parent ) ;
46
46
}
47
47
48
- function getRequireExpressionArgument ( node : TSESTree . Node ) : O . Option < TSESTree . CallExpressionArgument [ ] > {
48
+ function getRequireExpressionArguments ( node : TSESTree . Node ) : O . Option < TSESTree . CallExpressionArgument [ ] > {
49
49
switch ( true ) {
50
50
// require('source')
51
51
case node . type === AST_NODE_TYPES . CallExpression
@@ -55,7 +55,7 @@ function getRequireExpressionArgument(node: TSESTree.Node): O.Option<TSESTree.Ca
55
55
}
56
56
// require('source').variable
57
57
case node . type === AST_NODE_TYPES . MemberExpression : {
58
- return getRequireExpressionArgument ( node . object ) ;
58
+ return getRequireExpressionArguments ( node . object ) ;
59
59
}
60
60
}
61
61
return O . none ( ) ;
You can’t perform that action at this time.
0 commit comments