Skip to content

Universal DevTools Kit SDK


Universal DevTools Kit SDK / @u-devtools/utils-node / normalizePath

Function: normalizePath() ​

normalizePath(filePath): string

Defined in: path.ts:12

Normalizes a file path to use forward slashes (/) for cross-platform compatibility. This is especially important for Windows paths that use backslashes (). Useful when injecting paths into HTML, virtual modules, or URLs.

Parameters ​

ParameterTypeDescription
filePathstringThe file path to normalize

Returns ​

string

The normalized path with forward slashes

Released under the MIT License.