Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lookfirst/retry-promise-typescript

Retry Promise for TypeScript
https://github.com/lookfirst/retry-promise-typescript

promise retry typescript

Last synced: about 1 month ago
JSON representation

Retry Promise for TypeScript

Awesome Lists containing this project

README

        

# Retry Promise for TypeScript

## About

I couldn't find a simple implementation of a retrying Promise library for TypeScript, so here you go.

## Usage

```
yarn add retry-promise-typescript
```

```
import {RetryPromise} from 'retry-promise-typescript';
import * as got from 'got';

new RetryPromise({retries: 10, log: true}).retry(got('https://www.google.com/')).then((result) => {
console.log(result);
}, (error) => {
console.log(error);
});
```

Donate BTC: 18zrUSJzvtxDmaGaThAZuR1GPMe2jwjmxW