MCPcopy Index your code
hub / github.com/reactjs/react-codemod / findImportPath

Function findImportPath

transforms/react-to-react-dom.js:349–353  ·  view source on GitHub ↗
(name, path)

Source from the content-addressed store, hash-verified

347 }
348 } else {
349 function findImportPath(name, path) {
350 return root
351 .find(j.ImportDeclaration, { source: { value: path } })
352 .filter(p => p.value.specifiers.find(sp => sp.type === 'ImportDefaultSpecifier' && sp.local.name === name));
353 }
354
355 function emitImport(name, path, knownProperties, uses) {
356 const usedProperties = coreImportDeclaration.value.specifiers.filter(

Callers 1

emitImportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected