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(
3434 }
3535 // check for: `variable = require('source')` or `variable = require('source').variable`
3636 return F . pipe (
37- getRequireExpressionArgument ( init ) ,
37+ getRequireExpressionArguments ( init ) ,
3838 O . flatMapNullable ( ( args ) => args [ 0 ] ) ,
3939 O . filter ( AST . isStringLiteral ) ,
4040 // check for: `require('source')` or `require('source/...')`
@@ -45,7 +45,7 @@ export function isInitializedFromSource(
4545 return isMatching ( { type : "ImportDeclaration" , source : { value : source } } , parent ) ;
4646}
4747
48- function getRequireExpressionArgument ( node : TSESTree . Node ) : O . Option < TSESTree . CallExpressionArgument [ ] > {
48+ function getRequireExpressionArguments ( node : TSESTree . Node ) : O . Option < TSESTree . CallExpressionArgument [ ] > {
4949 switch ( true ) {
5050 // require('source')
5151 case node . type === AST_NODE_TYPES . CallExpression
@@ -55,7 +55,7 @@ function getRequireExpressionArgument(node: TSESTree.Node): O.Option<TSESTree.Ca
5555 }
5656 // require('source').variable
5757 case node . type === AST_NODE_TYPES . MemberExpression : {
58- return getRequireExpressionArgument ( node . object ) ;
58+ return getRequireExpressionArguments ( node . object ) ;
5959 }
6060 }
6161 return O . none ( ) ;
You can’t perform that action at this time.
0 commit comments