MCPcopy Create free account
hub / github.com/cloudflare/computer / dirname

Function dirname

packages/computer/src/git/worktree.ts:320–323  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

318}
319
320function dirname(path: string): string {
321 const i = path.lastIndexOf("/");
322 return i === -1 ? "." : path.slice(0, i);
323}
324
325function errorMessage(cause: unknown): string {
326 if (cause instanceof Error) return cause.message;

Callers 4

cleanWithFunction · 0.70
ancestorDirsFunction · 0.70
topmostUntrackedDirFunction · 0.70
build-bundle.mjsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected