Skip to main content

type nonEmpty

An AsyncReducer that outputs true if one or more input values are received, false otherwise.

example
await AsyncStream.of(1, 2, 3).reduce(AsyncReducer.nonEmpty))
// => true

Definition

nonEmpty: AsyncReducer<any, boolean>