BACK
Reference · 65

find

Finds the first value that passes the predicate.

Signature

find(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction

What it does

Checks values one by one. As soon as the predicate returns true, it emits that value and ends the stream.

When to use

Finding the first matching event, the first valid result, the first element with a given id.

See also

first, findIndex, filter

script.ts // TypeScript
CONSOLE · Console output
Hit Run to see the result...