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>
18 lines
440 B
Text
18 lines
440 B
Text
import { toUint8Array } from "@smithy/util-utf8";
|
|
import { Writable } from "stream";
|
|
export class HashCalculator extends Writable {
|
|
hash;
|
|
constructor(hash, options) {
|
|
super(options);
|
|
this.hash = hash;
|
|
}
|
|
_write(chunk, encoding, callback) {
|
|
try {
|
|
this.hash.update(toUint8Array(chunk));
|
|
}
|
|
catch (err) {
|
|
return callback(err);
|
|
}
|
|
callback();
|
|
}
|
|
}
|