Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
409 B
Text
13 lines
409 B
Text
'use strict';
|
|
|
|
async function blobReader(blob, onChunk, chunkSize = 1024 * 1024) {
|
|
const size = blob.size;
|
|
let totalBytesRead = 0;
|
|
while (totalBytesRead < size) {
|
|
const slice = blob.slice(totalBytesRead, Math.min(size, totalBytesRead + chunkSize));
|
|
onChunk(new Uint8Array(await slice.arrayBuffer()));
|
|
totalBytesRead += slice.size;
|
|
}
|
|
}
|
|
|
|
exports.blobReader = blobReader;
|