0.0.1 • Published 2 years ago
heartbeat-retry v0.0.1
If I should maintain this repo, please ⭐️
DM me on Twitter if you have questions or suggestions.
npm install heartbeat-retryyarn add heartbeat-retrypnpm add heartbeat-retrybun add heartbeat-retryUsage
heartbeat-retry is built on p-retry, so it exposes the same options, in addition to heartbeat and onHeartbeat:
import retry from "heartbeat-retry";
retry(promise, {
heartbeat: 10_000, // 10 seconds
onHeartbeat: (elapsed: number) => {
console.log("Heartbeat")
},
retries: 5,
onFailedAttempt: (error) => {
console.log("Failed attempt", error);
}
});- p-retry: Retry a promise-returning or async function
- @autossey/eslint-config: A base for projects that use ESLint.
- @autossey/tsconfig: A base TSConfig for various project types.
0.0.1
2 years ago