MCPcopy
hub / github.com/electerm/electerm / hasWinDrive

Function hasWinDrive

src/client/common/resolve.js:16–16  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

14
15export default function resolve (basePath, nameOrDot) {
16 const hasWinDrive = (path) => /^[a-zA-Z]:/.test(path)
17 const isWin = basePath.includes('\\') || nameOrDot.includes('\\') || hasWinDrive(basePath) || hasWinDrive(nameOrDot)
18 const sep = isWin ? '\\' : '/'
19 if (/^[a-zA-Z]:/.test(nameOrDot)) {

Callers 1

resolveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected