from
fun from(iterable: JsIterable<Any?>, options: ReadableOptions = definedExternally): Readable(source)
fun from(iterable: AsyncIterable<Any?>, options: ReadableOptions = definedExternally): Readable(source)
A utility method for creating Readable Streams out of iterators.
Since
v12.3.0, v10.17.0
Parameters
iterable
Object implementing the Symbol.asyncIterator
or Symbol.iterator
iterable protocol. Emits an 'error' event if a null value is passed.
options
Options provided to new stream.Readable([options])
. By default, Readable.from()
will set options.objectMode
to true
, unless this is explicitly opted out by setting options.objectMode
to false
.