UNPKG

@vctrl/hooks

Version:

vctrl/hooks is a React hooks package designed to simplify 3D model loading and management within React applications. It's part of the vectreal-core ecosystem and is primarily used in the vctrl/viewer React component and the official website application.

18 lines (17 loc) 583 B
/** * Determines the extension of a file based on its URI and MIME type. * * If the MIME type is not provided, it is inferred from the URI. * * Returns a default `png` extension if the extension is unknown. * * @param {string} uri - The URI of the image * @param {string} mimeType - The MIME type of the image */ export declare function getFileExtension(uri: string, mimeType?: string): string; /** * Extracts the base name of a file from its URI. * * @param {string} filename - The name of the file */ export declare function getFileBasename(filename: string): string;