(code)
| 109 | } |
| 110 | |
| 111 | function getWindowExports(code) { |
| 112 | const re = /exports\.(.*);/gm |
| 113 | let m = [] |
| 114 | let e |
| 115 | while (e = re.exec(code)) { // eslint-disable-line |
| 116 | const name = (e[1] || '').split('=')[0].trim() |
| 117 | m.push({ |
| 118 | isDefault: name === 'default' || name === 'init', |
| 119 | name: name, |
| 120 | statement: e[0] |
| 121 | }) |
| 122 | } |
| 123 | return m |
| 124 | } |
| 125 | |
| 126 | // function getVariableInformation(body) { |
| 127 | // return body |