UNPKG

@modern-kit/utils

Version:
17 lines (14 loc) 391 B
import { getBlobFromUrl } from '../getBlobFromUrl/index.mjs'; async function getMIMETypeFromUrl(url) { try { const blob = await getBlobFromUrl(url); return blob?.type ?? ""; } catch (err) { console.error( `Failed to get the MIME type from the URL. message: ${err.message}` ); return ""; } } export { getMIMETypeFromUrl }; //# sourceMappingURL=index.mjs.map