MCPcopy Create free account
hub / github.com/DavidWells/analytics / getWindowExports

Function getWindowExports

scripts/docs/parse/index.js:111–124  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

109}
110
111function 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

Callers 1

parseCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected