koa-node-resolve
Version:
Koa middleware that transforms Node package specifiers to relative paths
16 lines • 959 B
TypeScript
/**
* Similar to `path.dirname()` except includes trailing slash and for a
* path `/like/this/` will return `/like/this/` instead of `/like` since the
* trailing slash indicates `this` is a folder name not a file name.
* (`path.dirname('/like/this/')` returns `/like`.)
*/
export declare const dirname: (path: string) => string;
export declare const ensureLeadingDotInURL: (path: string) => string;
export declare const ensureTrailingSlashInPath: (path: string) => string;
export declare const forwardSlashesOnlyPlease: (path: string) => string;
export declare const getBaseURL: (href: string) => string;
export declare const noTrailingSlashInPath: (path: string) => string;
export declare const noLeadingSlashInURL: (href: string) => string;
export declare const relativePathToURL: (from: string, to: string) => string;
export declare const resolvePathPreserveTrailingSlash: (from: string, to: string) => string;
//# sourceMappingURL=path-utils.d.ts.map