@flex-development/pathe
Version:
Universal drop-in replacement for node:path
29 lines (28 loc) • 555 B
text/typescript
/**
* @file isAbsolute
* @module pathe/lib/isAbsolute
*/
/**
* Determine if `path` is absolute.
*
* @example
* isAbsolute('') // false
* @example
* isAbsolute('../') // false
* @example
* isAbsolute(cwd()) // true
* @example
* isAbsolute(toPath(new URL('node:path'))) // false
*
* @category
* core
*
* @this {void}
*
* @param {string} path
* The path to check
* @return {boolean}
* `true` if `path` is absolute, `false` otherwise
*/
declare function isAbsolute(this: void, path: string): boolean;
export default isAbsolute;