MCPcopy Index your code
hub / github.com/jhen0409/react-native-debugger / inject

Function inject

npm-package/src/injectDevToolsMiddleware.js:194–203  ·  view source on GitHub ↗
(modulePath, moduleName)

Source from the content-addressed store, hash-verified

192}
193
194export const inject = (modulePath, moduleName) => {
195 const info = getModuleInfo(modulePath, moduleName)
196 const flagList = getFlag(info.name, info.version)
197 if (Array.isArray(flagList)) {
198 flagList.some((flag) => injectCode(modulePath, flag))
199 } else {
200 injectCode(modulePath, flagList)
201 }
202 return true
203}
204
205const revertCode = (
206 modulePath,

Callers 2

main.jsFile · 0.90

Calls 3

getModuleInfoFunction · 0.85
getFlagFunction · 0.85
injectCodeFunction · 0.85

Tested by

no test coverage detected