0.0.1 • Published 3 years ago
@tkvw/rxjs v0.0.1
Retry
import { createRetry } from "@tkvw/rxjs";
const {attempt,retry} = createRetry(cancel,m => ({
...m,
message: "additional data"
}));
const subscription = attempt.subscribe(({attempt,error,cancel}) => {
if(attempt>=10){
cancel();
}
});
of(1)
.pipe(retry)
.subscribe();
0.0.1
3 years ago