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>
9 lines
382 B
Text
9 lines
382 B
Text
export const toUtf8 = (input) => {
|
|
if (typeof input === "string") {
|
|
return input;
|
|
}
|
|
if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
|
|
throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
|
|
}
|
|
return new TextDecoder("utf-8").decode(input);
|
|
};
|