Stream

open external class Stream : EventEmitter(source)

Inheritors

Constructors

Link copied to clipboard
constructor(opts: ReadableOptions = definedExternally)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open fun <T : ReadableStream> compose(stream: T, options: StreamComposeOptions = definedExternally): T
open fun <T : ReadableStream> compose(stream: AsyncIterable<T>, options: StreamComposeOptions = definedExternally): T
open fun <T : ReadableStream> compose(stream: JsIterable<T>, options: StreamComposeOptions = definedExternally): T
open fun <T : ReadableStream> compose(stream: ComposeFnParam, options: StreamComposeOptions = definedExternally): T
Link copied to clipboard

Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

Link copied to clipboard

Returns the current max listener value for the EventEmitter which is either set by emitter.setMaxListeners(n) or defaults to {@link defaultMaxListeners}.

Link copied to clipboard
fun <T : WritableStream> pipe(destination: T, options: StreamPipeOptions = definedExternally): T
Link copied to clipboard

By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.