path.normalize(p)
Normalize a string path, taking care of '..' 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.
Example:
path.normalize('/foo/bar//baz/asdf/quux/..')
// returns '/foo/bar/baz/asdf'Note: If the path string passed as argument is a zero-length string then '.' will be returned, which represents the current working directory.
Please login to continue.