deno.com

class Stream

extends EventEmitter

Methods #

#compose<T extends ReadableStream>(
stream:
T
| ComposeFnParam
| Iterable<T>
| AsyncIterable<T>
,
options?: { signal: AbortSignal; },
): T
#pipe<T extends WritableStream>(
destination: T,
options?: { end?: boolean | undefined; },
): T

namespace Stream

Classes #

c
I
Stream.Duplex

Duplex streams are streams that implement both the Readable and Writable interfaces.

c
Stream.PassThrough

The stream.PassThrough class is a trivial implementation of a Transform stream that simply passes the input bytes across to the output. Its purpose is primarily for examples and testing, but there are some use cases where stream.PassThrough is useful as a building block for novel sorts of streams.

    c
    Stream.Transform

    Transform streams are Duplex streams where the output is in some way related to the input. Like all Duplex streams, Transform streams implement both the Readable and Writable interfaces.

    Functions #

    f
    Stream.addAbortSignal

    A stream to attach a signal to.

      f
      Stream.duplexPair

      The utility function duplexPair returns an Array with two items, each being a Duplex stream connected to the other side:

        f
        N
        Stream.finished

        A readable and/or writable stream/webstream.

          f
          Stream.getDefaultHighWaterMark

          Returns the default highWaterMark used by streams. Defaults to 65536 (64 KiB), or 16 for objectMode.

            f
            Stream.isErrored

            Returns whether the stream has encountered an error.

              f
              Stream.isReadable

              Returns whether the stream is readable.

                f
                N
                Stream.pipeline

                A module method to pipe between streams and generators forwarding errors and properly cleaning up and provide a callback when the pipeline is complete.

                  f
                  Stream.setDefaultHighWaterMark

                  Sets the default highWaterMark used by streams.

                    Interfaces #

                    Type Aliases #

                    T
                    Stream.PipelineCallback
                    No documentation available
                      T
                      Stream.PipelineDestination
                      No documentation available
                        T
                        Stream.PipelinePromise
                        No documentation available
                          T
                          Stream.PipelineSource
                          No documentation available
                            T
                            Stream.PipelineSourceFunction
                            No documentation available
                              T
                              Stream.PipelineTransform
                              No documentation available
                                T
                                Stream.PipelineTransformSource
                                No documentation available
                                  T
                                  Stream.TransformCallback
                                  No documentation available