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

Function samplePaths

src/bin/codegraph.ts:1217–1219  ·  view source on GitHub ↗

Up to three of `paths`, and how many more there are.

(paths: string[])

Source from the content-addressed store, hash-verified

1215
1216/** Up to three of `paths`, and how many more there are. */
1217function samplePaths(paths: string[]): string {
1218 return paths.slice(0, 3).join(', ') + (paths.length > 3 ? ` (+${formatNumber(paths.length - 3)} more)` : '');
1219}
1220
1221/** A file size as people say it: "1.9 MB", "640 KB". */
1222function formatFileSize(bytes: number): string {

Callers 2

mainFunction · 0.85

Calls 2

formatNumberFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected