@tkvw/rxjs
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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();

Readme

Keywords

none

Package Sidebar

Install

npm i @tkvw/rxjs

Weekly Downloads

17

Version

0.0.1

License

ISC

Unpacked Size

46.6 kB

Total Files

40

Last publish

Collaborators

  • tkvw