@humanwhocodes/retry
Advanced tools
Comparing version 0.1.3 to 0.2.0
@@ -189,4 +189,3 @@ /** | ||
result = fn(); | ||
} catch (error) { | ||
// @ts-ignore TS doesn't know about the second argument to Error? | ||
} catch (/** @type {any} */ error) { | ||
return Promise.reject(new Error(`Synchronous error: ${error.message}`, { cause: error })); | ||
@@ -193,0 +192,0 @@ } |
{ | ||
"name": "@humanwhocodes/retry", | ||
"version": "0.1.3", | ||
"version": "0.2.0", | ||
"description": "A utility to retry failed async methods.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -9,3 +9,3 @@ # Retry utility | ||
A utility for retrying a failed async JavaScript call based on the error returned. | ||
A utility for retrying failed async JavaScript calls based on the error returned. | ||
@@ -38,9 +38,18 @@ ## Usage | ||
Import into your Deno project: | ||
Install using [JSR](https://jsr.io): | ||
```shell | ||
deno add @humanwhocodes/retry | ||
#or | ||
jsr add @humanwhocodes/retry | ||
``` | ||
Then import into your Deno project: | ||
```js | ||
import { Retrier } from "https://cdn.skypack.dev/@humanwhocodes/retry?dts"; | ||
import { Retrier } from "@humanwhocodes/retry"; | ||
``` | ||
### Bun | ||
@@ -47,0 +56,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123
40104
696