Skip to main content
default.PlatformPath.normalize - path - Node documentation
method default.PlatformPath.normalize

Usage in Deno

import type mod from "node:path";
PlatformPath.normalize(path: string): string

Normalize a string path, reducing '..' and '.' parts. When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.

Parameters

path: string

string path to normalize.

Return Type

string

Throws

TypeError

if path is not a string.

Back to top