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>
21 lines
501 B
Text
21 lines
501 B
Text
import { decode, setPayload } from "./cbor-decode";
|
|
import { encode, resize, toUint8Array } from "./cbor-encode";
|
|
export const cbor = {
|
|
deserialize(payload) {
|
|
setPayload(payload);
|
|
return decode(0, payload.length);
|
|
},
|
|
serialize(input) {
|
|
try {
|
|
encode(input);
|
|
return toUint8Array();
|
|
}
|
|
catch (e) {
|
|
toUint8Array();
|
|
throw e;
|
|
}
|
|
},
|
|
resizeEncodingBuffer(size) {
|
|
resize(size);
|
|
},
|
|
};
|