MCPcopy Create free account
hub / github.com/TanStack/cli / basenamePath

Function basenamePath

packages/create/src/edge-path.ts:40–47  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

38}
39
40export function basenamePath(path: string): string {
41 const normalized = normalizePath(path)
42 if (normalized === '/') {
43 return ''
44 }
45
46 return normalized.split('/').pop() ?? ''
47}
48
49export function dirnamePath(path: string): string {
50 const normalized = normalizePath(path)

Callers 5

reportFunction · 0.85
relativePathFunction · 0.85
cleanUpFilesFunction · 0.85
cleanUpFileArrayFunction · 0.85
extnamePathFunction · 0.85

Calls 1

normalizePathFunction · 0.70

Tested by

no test coverage detected