keep-a-changelog
Version:
Node package to parse and generate changelogs following the [keepachangelog](https://keepachangelog.com/) format.
23 lines • 871 B
TypeScript
/**
* Return the last portion of a `path`.
* Trailing directory separators are ignored, and optional suffix is removed.
*
* @example Usage
* ```ts
* import { basename } from "@std/path/windows/basename";
* import { assertEquals } from "@std/assert";
*
* assertEquals(basename("C:\\user\\Documents\\"), "Documents");
* assertEquals(basename("C:\\user\\Documents\\image.png"), "image.png");
* assertEquals(basename("C:\\user\\Documents\\image.png", ".png"), "image");
* ```
*
* Note: If you are working with file URLs,
* use the new version of `basename` from `@std/path/windows/unstable-basename`.
*
* @param path The path to extract the name from.
* @param suffix The suffix to remove from extracted name.
* @returns The extracted name.
*/
export declare function basename(path: string, suffix?: string): string;
//# sourceMappingURL=basename.d.ts.map