Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/lookfirst/retry-promise-typescript
- Owner: lookfirst
- License: mit
- Created: 2017-09-03T05:43:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-10T03:39:21.000Z (over 7 years ago)
- Last Synced: 2024-11-14T12:53:27.944Z (about 2 months ago)
- Topics: promise, retry, typescript
- Language: TypeScript
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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