(body, name)
| 99 | } |
| 100 | |
| 101 | function getMethodsReturned(body, name) { |
| 102 | // First try to find function that === main export |
| 103 | const methodsExposed = getFunctionDetails(body, name) |
| 104 | if (methodsExposed && methodsExposed.length) { |
| 105 | return methodsExposed |
| 106 | } |
| 107 | // Then try to find variable declaration as fallback |
| 108 | return getVariableDetails(body, name) |
| 109 | } |
| 110 | |
| 111 | function getWindowExports(code) { |
| 112 | const re = /exports\.(.*);/gm |
no test coverage detected