MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / nodesInFileNamed

Function nodesInFileNamed

src/resolution/import-resolver.ts:347–349  ·  view source on GitHub ↗

The file's nodes named `name`, in `getNodesInFile` order.

(filePath: string, name: string, context: ResolutionContext)

Source from the content-addressed store, hash-verified

345
346/** The file's nodes named `name`, in `getNodesInFile` order. */
347function nodesInFileNamed(filePath: string, name: string, context: ResolutionContext): Node[] {
348 return context.getNodesInFileNamed?.(filePath, name) ?? context.getNodesInFile(filePath).filter((n) => n.name === name);
349}
350
351/**
352 * The declaration a module default-exports: what its own `export default`

Callers 3

statedDefaultExportFunction · 0.85
exportedByNameFunction · 0.85
findExportedSymbolWalkFunction · 0.85

Calls 2

getNodesInFileNamedMethod · 0.80
getNodesInFileMethod · 0.65

Tested by

no test coverage detected