MCPcopy
hub / github.com/tailwindlabs/tailwindcss / normalizePath

Function normalizePath

packages/@tailwindcss-node/src/normalize-path.ts:33–47  ·  view source on GitHub ↗
(originalPath: string)

Source from the content-addressed store, hash-verified

31}
32
33export function normalizePath(originalPath: string) {
34 let normalized = normalizePathBase(originalPath)
35
36 // Make sure Windows network share paths are normalized properly
37 // They have to begin with two slashes or they won't resolve correctly
38 if (
39 originalPath.startsWith('\\\\') &&
40 normalized.startsWith('/') &&
41 !normalized.startsWith('//')
42 ) {
43 return `/${normalized}`
44 }
45
46 return normalized
47}

Callers 6

replacerForDeclarationFunction · 0.90
fixRelativePathFunction · 0.90
generateMethod · 0.90
tailwindLoaderFunction · 0.90
relativeToStylesheetFunction · 0.90
linkConfigsFunction · 0.90

Calls 1

normalizePathBaseFunction · 0.85

Tested by

no test coverage detected