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

Method getPathWithoutFileName

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

Source from the content-addressed store, hash-verified

14184 return parts.pop()
14185 }
14186 static getPathWithoutFileName(path) {
14187 const normalizedPath = path.replace(/\\/g, "/")
14188 const parts = normalizedPath.split("/")
14189 parts.pop()
14190 return parts.join("/")
14191 }
14192 static shuffleInPlace(arr, seed = Date.now()) {
14193 // https://stackoverflow.com/questions/6274339/how-can-i-shuffle-an-array
14194 const randFn = Utils._getPseudoRandom0to1FloatGenerator(seed)

Callers 3

requireAbsOrRelativeMethod · 0.95
resolvePathMethod · 0.95

Calls 3

replaceMethod · 0.80
splitMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected