
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
delayed-promise-retry
Advanced tools
A helper to execute a promise a certain number of times if it's throwing an exception, also inserting a delay between each attempt.
A helper to execute a promise a certain number of times if it's throwing an exception, also inserting a delay between each attempt.
npm install delayed-promise-retry
yarn add delayed-promise-retry
const { delayedPromiseRetry } = require('delayed-promise-retry');
(async () => {
const fn = async () => {
console.log('trying...');
throw new Error();
};
const retries = 3;
const retryDelay = 1000;
try {
await delayedPromiseRetry(fn, retries, retryDelay);
} catch(error) {
console.log(error);
}
})();
const { delayedPromiseRetry } = require('delayed-promise-retry');
(async () => {
const fn = async () => {
console.log('trying...');
throw new Error();
};
const retries = 3;
const retryDelay = (retryNumber) => retryNumber * 1000;
try {
await delayedPromiseRetry(fn, retries, retryDelay);
} catch(error) {
console.log(error);
}
})();
const { delayedPromiseRetry, exponentialDelay } = require('delayed-promise-retry');
(async () => {
const fn = async () => {
console.log('trying...');
throw new Error();
};
const retries = 3;
try {
await delayedPromiseRetry(fn, retries, exponentialDelay);
} catch(error) {
console.log(error);
}
})();
👤 Publio Blenilio
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2021-present Publio Blenilio.
This project is MIT licensed.
FAQs
A helper to execute a promise a certain number of times if it's throwing an exception, also inserting a delay between each attempt.
The npm package delayed-promise-retry receives a total of 129 weekly downloads. As such, delayed-promise-retry popularity was classified as not popular.
We found that delayed-promise-retry demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.