@oazmi/build-tools
Version:
general deno build tool scripts which I practically use in all of my typescript repos
18 lines • 617 B
TypeScript
/**
* Return the extension of the `path` with leading period.
*
* @example Usage
* ```ts
* import { extname } from "@std/path/posix/extname";
* import { assertEquals } from "@std/assert/assert-equals";
*
* assertEquals(extname("/home/user/Documents/file.ts"), ".ts");
* assertEquals(extname("/home/user/Documents/"), "");
* assertEquals(extname("/home/user/Documents/image.png"), ".png");
* ```
*
* @param path The path to get the extension from.
* @returns The extension (ex. for `file.ts` returns `.ts`).
*/
export declare function extname(path: string): string;
//# sourceMappingURL=extname.d.ts.map