toArray

abstract fun toArray(): JsPromise<Array<Value>>

Collect all items in this stream into an array.

Return

A promise that resolves with the array of items.


abstract fun toArray(options: Value): JsPromise<Array<Value>>
abstract fun toArray(options: ReadableToArrayOptions): JsPromise<Array<Value>>

Collect all items in this stream into an array.

Return

A promise that resolves with the array of items.

Parameters

options

The options for the toArray operation.