find

abstract fun find(cbk: Value): JsPromise<Value>
abstract fun find(cbk: () -> Boolean?): JsPromise<Value>

Find the first item in this stream that matches the given predicate.

Return

A promise that resolves with the result.

Parameters

cbk

The predicate to check.


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

Find the first item in this stream that matches the given predicate.

Return

A promise that resolves with the result.

Parameters

cbk

The predicate to check.

options

The options for the find operation.


abstract fun find(options: ReadableFindOptions, cbk: () -> Boolean?): JsPromise<Value>

Find the first item in this stream that matches the given predicate.

Return

A promise that resolves with the result.

Parameters

options

The options for the find operation.

cbk

The predicate to check.