@flex-development/pathe
Version:
Universal drop-in replacement for node:path
24 lines (23 loc) • 523 B
text/typescript
/**
* @file dirname
* @module pathe/lib/dirname
*/
/**
* Get the directory name of `input`, similar to the Unix `dirname` command.
*
* Trailing [directory separators][sep] are ignored.
*
* [sep]: https://nodejs.org/api/path.html#pathsep
*
* @category
* core
*
* @this {void}
*
* @param {URL | string} input
* The {@linkcode URL}, URL string, or path to handle
* @return {string}
* Directory name of `input`
*/
declare function dirname(this: void, input: URL | string): string;
export default dirname;