(p: string): string Normalize a path to POSIX form (forward slashes).
Replaces every backslash with a forward slash. Idempotent: forward-slash input returns unchanged. Empty string returns empty string.
p
stringreturns
string examples
toPosixPath('C:\\proj\\src\\lib\\foo.ts') // => 'C:/proj/src/lib/foo.ts'
toPosixPath('/home/user/proj/foo.ts') // => '/home/user/proj/foo.ts' (unchanged)
toPosixPath('') // => ''