pipeObservablePipes
Alternative: pipe$$$
Types
function pipeObservablePipes<// generics
GFunctions extends IObservablePipePipeConstraint<GFunctions>
//
>(
fns: GFunctions
): IPipeObservablePipesReturn<GFunctions>
Definition
This function allows you to pipe (chain) many ObservablePipes.
This is equivalent the RxJS pipe function
Example
ObservablePipe which keeps only positive numbers and convert them to strings
const customPipe$$$ = pipe$$$([
filter$$$(value => (value >= 0)),
map$$$(String),
]);
const subscribe = customPipe$$$(of(-2, -1, 0, 1, 2));
const unsubscribe = subscribe((value: string) => {
console.log(value);
});
Output:
0
1
2
RxJS equivalent
pipe(
filter(value => (value >= 0)),
map(String),
);