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

Function fileNameStem

src/db/reference-tail.ts:117–120  ·  view source on GitHub ↗

A file or folder name up to its first dot: 'b.dart' → 'b', 'types.d.ts' → 'types', '.eslintrc.js' → '.eslintrc'.

(name: string)

Source from the content-addressed store, hash-verified

115
116/** A file or folder name up to its first dot: 'b.dart' → 'b', 'types.d.ts' → 'types', '.eslintrc.js' → '.eslintrc'. */
117function fileNameStem(name: string): string {
118 const dot = name.indexOf('.', 1);
119 return dot > 0 ? name.slice(0, dot) : name;
120}
121
122/**
123 * What an import of the file at `filePath` can be written as, for the failed

Callers 2

pathStemFunction · 0.85
importPathKeysFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected