MCPcopy Create free account
hub / github.com/isomorphic-git/isomorphic-git / getWindowsDrivePrefix

Function getWindowsDrivePrefix

src/utils/join.js:81–86  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

79
80// Returns the Windows drive prefix ("C:") if present, otherwise null.
81function getWindowsDrivePrefix(path) {
82 if (path.length >= 2 && /^[a-zA-Z]:/.test(path)) {
83 return path.slice(0, 2) // e.g. "C:"
84 }
85 return null
86}
87
88function normalize(path) {
89 if (!path.length) return '.'

Callers 1

normalizeFunction · 0.85

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…