UNPKG

@modern-kit/utils

Version:
18 lines (16 loc) 424 B
async function getBlobFromUrl(url) { try { const response = await fetch(url); if (!response.ok) { throw new Error(`Failed to fetch resource. status: ${response.status}`); } return await response.blob(); } catch (err) { console.error( `Failed to get the Blob from the URL. message: ${err.message}` ); throw err; } } export { getBlobFromUrl }; //# sourceMappingURL=index.mjs.map