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

Function getMethodsReturned

scripts/docs/parse/index.js:101–109  ·  view source on GitHub ↗
(body, name)

Source from the content-addressed store, hash-verified

99}
100
101function 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
111function getWindowExports(code) {
112 const re = /exports\.(.*);/gm

Callers 1

parseCodeFunction · 0.85

Calls 2

getFunctionDetailsFunction · 0.85
getVariableDetailsFunction · 0.85

Tested by

no test coverage detected