File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,14 @@ function processAst(ast, cb) {
212
212
const expression = path . node . expression ;
213
213
if ( expression && expression . type === 'AssignmentExpression' ) {
214
214
const left = expression . left ;
215
- if ( left . type === 'MemberExpression' &&
215
+ if ( left . object . type === 'MemberExpression' &&
216
+ left . object . object . name === 'module' &&
217
+ left . object . property . name === 'exports' ) {
218
+ // When module.exports.funcName = func1
219
+ if ( expression . right . type === 'Identifier' ) {
220
+ return cb ( left . property . name , null , 'exportObj' ) ;
221
+ }
222
+ } else if ( left . type === 'MemberExpression' &&
216
223
left . object . name === 'module' &&
217
224
left . property . name === 'exports' ) {
218
225
// When module.exports is set to a single function
You can’t perform that action at this time.
0 commit comments