first
Last updated
Last updated
first(predicate: function, select: function)
๐ก The counterpart to first is !
๐ก First
will deliver an EmptyError to the Observer's error callback if the Observable completes before any next notification was sent. If you don't want this behavior, use take(1)
instead.
( )
Example 1: First value from sequence
( | | )
Example 2: First value to pass predicate
Example 3: Utilizing default value
( | | )
( | | )
๐ฐ - Official docs
๐ฅ ๐ต - Andrรฉ Staltz
๐ Source Code: