MCPcopy Create free account
hub / github.com/massCodeIO/massCode / dirname

Function dirname

src/main/http/import/opencollection.ts:53–57  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

51}
52
53function dirname(path: string): string {
54 const normalized = normalizePath(path)
55 const index = normalized.lastIndexOf('/')
56 return index === -1 ? '' : normalized.slice(0, index)
57}
58
59function basename(path: string): string {
60 const normalized = normalizePath(path)

Callers 5

parseOpenCollectionFilesFunction · 0.85
package.mjsFile · 0.85
updateStatsFunction · 0.85

Calls 1

normalizePathFunction · 0.85

Tested by

no test coverage detected