@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
12 lines • 469 B
text/typescript
/**
* Extracts the filename and extension from a URL or file path.
* This function is isomorphic and works in both Node.js and browser environments.
* It properly handles compound extensions like .module.css, .d.ts, .test.js, etc.
*
* @param url - The URL or file path to extract the filename from
* @returns An object containing the filename and extension
*/
export declare function getFileNameFromUrl(url: string): {
fileName: string;
extension: string;
};