import { Transformer } from "https://deno.land/x/rimbu@1.2.0/core/mod.ts";
const { splitOnSlice } = Transformer;
Returns a Transformer
that collects the received elements
into a collector
that will be returned as output every time the input matches the given sepSlice
sequence of elements.
Parameters
sepSlice: StreamSource<T>
- a predicate function taking an element
- (optional) object specifying the following properties
- eq - (default:
Eq.objectIs
) the equality testing function - collector: (default: Reducer.toArray()) an AsyncReducer that can accept multiple values and reduce them into a single value of type
R
.