Operators are functions of the form:
type Op<T, R> = (src: ReadableStream<T>) => ReadableStream<R>
This only requires ReadableStream to be implemented/available with getReader support.
Transform each value or the entire stream structure:
map- Transform each value through a functionmapSync- Synchronous transformation for better performancescan- Accumulate values and emit intermediate resultsreduce- Accumulate values and emit only the final resultswitchMap- Map to streams, switch to latest (with cancellation)concatMap- Map to streams, concatenate sequentiallymergeMap- Map to streams, merge concurrentlyexhaustMap- Map to streams, ignore new while activeswitchAll- Flatten stream of streams, switch to latestconcatAll- Flatten stream of streams sequentiallymergeAll- Flatten stream of streams concurrentlyexhaustAll- Flatten stream of streams, ignore new while activepairwise- Emit previous and current values as pairs
Filter or limit the values that pass through:
filter- Filter values with a predicatedistinctUntilChanged- Remove consecutive duplicatesdistinctUntilKeyChanged- Remove consecutive duplicates by keydistinct- Remove duplicate values globallyfirst- Take first value (optionally matching predicate)last- Take last value (optionally matching predicate)take- Take first N valuestakeUntil- Take until another stream emitstakeWhile- Take while predicate is trueskip- Skip first N valuesskipWhile- Skip while predicate is trueignoreElements- Ignore all values, preserve completion
Control the timing of emissions:
debounceTime- Emit latest value after quiet periodthrottleTime- Limit emission ratedelay- Delay all emissions by specified timetimeout- Error if no emission within duration
Collect and group values:
Observe, handle errors, and control flow:
tap- Observe values without modificationon- Attach lifecycle callbackscatchError- Handle errors with fallback streamschedule- Control emission timing with schedulerthrough- Use native TransformStreamwithLatestFrom- Combine with latest from other streamdefaultIfEmpty- Provide default for empty streamscount- Count values (optionally with predicate)bridge- Bridge to external stream systems