UNPKG

@flex-development/pathe

Version:

Universal drop-in replacement for node:path

27 lines (26 loc) 635 B
/** * @file normalize * @module pathe/lib/normalize */ /** * Normalize `path`, resolving `'..'` and `'.'` segments. * * When multiple, sequential path segment separators are found, they are * replaced by a single instance of {@linkcode sep}. Trailing separators are * preserved. * * If `path` is a zero-length string, {@linkcode dot} is returned, representing * the current working directory. * * @category * core * * @this {void} * * @param {string} path * The path to normalize * @return {string} * Normalized `path` */ declare function normalize(this: void, path: string): string; export default normalize;