Skip to main content
Version: Next (2.x)

normalizeString()

normalizeString(path, allowAboveRoot): string

Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.

Parameters

ParameterTypeDescription

path

string

The path to normalise.

allowAboveRoot

boolean

Whether to allow the resulting path to be above the root directory.

Returns

string

the normalised path string.