For a stream that emits arrays of values, this op will select a single value.
Can select based on:
// If source is Reactive<Array<number>>, picks the first even numbersingleFromArray(source, { predicate: v => v % 2 === 0});// Selects a random value from sourcesingleFromArray(source, { order: `random`, at: 0}); Copy
// If source is Reactive<Array<number>>, picks the first even numbersingleFromArray(source, { predicate: v => v % 2 === 0});// Selects a random value from sourcesingleFromArray(source, { order: `random`, at: 0});
If neither predicate or at options are given, exception is thrown.
predicate
at
Source to read from
Options for selection
For a stream that emits arrays of values, this op will select a single value.
Can select based on:
If neither
predicate
orat
options are given, exception is thrown.