@modern-kit/utils
Version:
1 lines • 761 B
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../../src/file/getMIMETypeFromUrl/index.ts"],"sourcesContent":["import { getBlobFromUrl } from '../getBlobFromUrl';\n\nexport async function getMIMETypeFromUrl(url: string) {\n try {\n const blob = await getBlobFromUrl(url);\n return blob?.type ?? '';\n } catch (err: any) {\n console.error(\n `Failed to get the MIME type from the URL. message: ${err.message}`\n );\n return '';\n }\n}\n"],"names":[],"mappings":";;AAEA,eAAsB,mBAAmB,GAAA,EAAa;AACpD,EAAA,IAAI;AACF,IAAA,MAAM,IAAA,GAAO,MAAM,cAAA,CAAe,GAAG,CAAA;AACrC,IAAA,OAAO,MAAM,IAAA,IAAQ,EAAA;AAAA,EACvB,SAAS,GAAA,EAAU;AACjB,IAAA,OAAA,CAAQ,KAAA;AAAA,MACN,CAAA,mDAAA,EAAsD,IAAI,OAAO,CAAA;AAAA,KACnE;AACA,IAAA,OAAO,EAAA;AAAA,EACT;AACF;;;;"}