locutus
Version:
Locutus other languages' standard libraries to JavaScript for fun and educational purposes
11 lines (10 loc) • 437 B
TypeScript
type PathInfoOptionName = 'PATHINFO_DIRNAME' | 'PATHINFO_BASENAME' | 'PATHINFO_EXTENSION' | 'PATHINFO_FILENAME' | 'PATHINFO_ALL';
type PathInfoOptions = number | PathInfoOptionName | PathInfoOptionName[];
type PathInfoMap = {
dirname?: string;
basename?: string;
extension?: string;
filename?: string;
};
export declare function pathinfo(path: string, options?: PathInfoOptions): PathInfoMap | string | false;
export {};