MCPcopy Create free account
hub / github.com/breck7/scroll / getFileName

Method getFileName

external/.scrollLibs.js:14181–14185  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

14179 return filename ? filename.replace(/\.[^\.]+$/, "") : ""
14180 }
14181 static getFileName(path) {
14182 const normalizedPath = path.replace(/\\/g, "/")
14183 const parts = normalizedPath.split("/")
14184 return parts.pop()
14185 }
14186 static getPathWithoutFileName(path) {
14187 const normalizedPath = path.replace(/\\/g, "/")
14188 const parts = normalizedPath.split("/")

Callers 1

Calls 2

replaceMethod · 0.80
splitMethod · 0.80

Tested by

no test coverage detected