MCPcopy
hub / github.com/vitejs/vite / globSafePath

Function globSafePath

packages/vite/src/node/plugins/importMetaGlob.ts:617–620  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

615) => Promise<string | undefined> | string | undefined
616
617function globSafePath(path: string) {
618 // slash path to ensure \ is converted to / as \ could lead to a double escape scenario
619 return escapePath(normalizePath(path))
620}
621
622function lastNthChar(str: string, n: number) {
623 return str.charAt(str.length - 1 - n)

Callers 2

globSafeResolvedPathFunction · 0.85
toAbsoluteGlobFunction · 0.85

Calls 1

normalizePathFunction · 0.90

Tested by

no test coverage detected