Rocky_Mountain_Vending/.pnpm-store/v10/files/a8/acc97572d25a553a131e5e7fa7b36eaf9b2a7b6efe98e2e0305a50c4bf15e679752b75d3a8cfcaa0928e296785fc36af5ac9b40611993efd6185b524d097ff
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

43 lines
No EOL
816 B
Text

'use strict';
import { Transform } from 'stream';
export default class ReadToEnd extends Transform {
constructor(options = {}) {
super(options);
this._encoding = options.encoding || 'utf8';
this._buffer = '';
}
_transform(chunk, encoding, done) {
this._buffer += chunk.toString(this._encoding);
this.push(chunk);
done();
}
_flush(done) {
this.emit('complete', null, this._buffer);
done();
}
static readToEnd(stream, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
const dest = new ReadToEnd(options);
stream.pipe(dest);
stream.on('error', (err) => {
stream.unpipe(dest);
callback(err);
});
dest.on('complete', callback);
dest.resume();
return dest;
}
}