forEach

abstract fun forEach(cbk: Value): JsPromise<Unit>
abstract fun forEach(cbk: (Value) -> Unit): JsPromise<Unit>

For each item in this stream, call the given callback.

Return

A promise that resolves when the operation is complete.

Parameters

cbk

The callback to call.


abstract fun forEach(cbk: Value, options: Value): JsPromise<Unit>

For each item in this stream, call the given callback.

Return

A promise that resolves when the operation is complete.

Parameters

cbk

The callback to call.

options

The options for the forEach operation.


abstract fun forEach(options: ReadableForEachOptions, cbk: (Value) -> Unit): JsPromise<Unit>

For each item in this stream, call the given callback.

Return

A promise that resolves when the operation is complete.

Parameters

options

The options for the forEach operation.

cbk

The callback to call.