Rocky_Mountain_Vending/.pnpm-store/v10/files/14/dfc6a32122cf04b1a42c7030c2cfb104f4b6a77173f6633784484febef6e8f943d5844f8f2eb517d61d7f98a53bd2f412f08a8a7e071347e7d3df36070900c
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
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>
2026-02-12 16:22:15 -07:00

32 lines
894 B
Text

'use strict';
var node_fs = require('node:fs');
const calculateBodyLength = (body) => {
if (!body) {
return 0;
}
if (typeof body === "string") {
return Buffer.byteLength(body);
}
else if (typeof body.byteLength === "number") {
return body.byteLength;
}
else if (typeof body.size === "number") {
return body.size;
}
else if (typeof body.start === "number" && typeof body.end === "number") {
return body.end + 1 - body.start;
}
else if (body instanceof node_fs.ReadStream) {
if (body.path != null) {
return node_fs.lstatSync(body.path).size;
}
else if (typeof body.fd === "number") {
return node_fs.fstatSync(body.fd).size;
}
}
throw new Error(`Body Length computation failed for ${body}`);
};
exports.calculateBodyLength = calculateBodyLength;