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

Function nodesInFileNamed

src/resolution/import-resolver.ts:143–145  ·  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

141
142/** The file's nodes named `name`, in `getNodesInFile` order. */
143function nodesInFileNamed(filePath: string, name: string, context: ResolutionContext): Node[] {
144 return context.getNodesInFileNamed?.(filePath, name) ?? context.getNodesInFile(filePath).filter((n) => n.name === name);
145}
146
147/** The declaration `export default NAME` names in this file (see FileExportIndex.defaultBinding). */
148function defaultExportBindingNode(filePath: string, idx: FileExportIndex, context: ResolutionContext): Node | undefined {

Callers 2

defaultExportBindingNodeFunction · 0.85
exportedByNameFunction · 0.85

Calls 2

getNodesInFileNamedMethod · 0.80
getNodesInFileMethod · 0.65

Tested by

no test coverage detected