-
-
Notifications
You must be signed in to change notification settings - Fork 0
readable stream
Nicholas Berlette edited this page Jun 19, 2025
·
1 revision
function isReadableStream<R>(it: unknown): it is ReadableStream<R>;
Checks if it is a ReadableStream
object.
Name | Info |
---|---|
it |
The value to check. |
true
if the value is a ReadableStream
, false
otherwise.
Streams
import { isReadableStream } from "jsr:@nick/is/readable-stream";
const stream = new ReadableStream();
isReadableStream(stream); // true
const stream2 = new TransformStream();
isReadableStream(stream2); // false
const stream3 = new WritableStream();
isReadableStream(stream3); // false