Returns a collector that partitions the entries in the Iterable into two arrays based on the predicate function.
Type of items in the source.
A function that tests each entry for a condition.
Collector that partitions the entries in the Iterable into two arrays based on the predicate function.
const result = partitionAsync((x) => x > 0)([1, 2, 3]);console.log(result); // [[1, 2, 3], []] Copy
const result = partitionAsync((x) => x > 0)([1, 2, 3]);console.log(result); // [[1, 2, 3], []]
Returns a collector that partitions the entries in the Iterable into two arrays based on the predicate function.