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>
13 lines
479 B
Text
13 lines
479 B
Text
import { PassThrough } from "stream";
|
|
import { splitStream as splitWebStream } from "./splitStream.browser";
|
|
import { isBlob, isReadableStream } from "./stream-type-check";
|
|
export async function splitStream(stream) {
|
|
if (isReadableStream(stream) || isBlob(stream)) {
|
|
return splitWebStream(stream);
|
|
}
|
|
const stream1 = new PassThrough();
|
|
const stream2 = new PassThrough();
|
|
stream.pipe(stream1);
|
|
stream.pipe(stream2);
|
|
return [stream1, stream2];
|
|
}
|