Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
promise-cache-retry
Advanced tools
Readme
If you simply cache the Promise it will always resolve with an error after an error occurs. On the other hand, retrying within a Promise will leave the Promise unresolved until the error is resolved, blocking further processing.
So this library works like this: If an error occurs, resolve it as an error, automatically perform retry processing (unless you disable it explicitly), and return the retry result when referencing the cache.
npm install --save promise-cache-retry
import { PromiseCache } from 'promise-cache-retry';
const cache = new PromiseCache({
promiseGenerator: async () => {
const res = await fetchData(ENDPOINT);
return res.data;
},
options: {
maxRetries: 2,
minRetryInterval: 3000,
},
});
export const handler = async () => {
const value = await cache.get();
}
PRs accepted.
Small note: If editing the Readme, please conform to the standard-readme specification.
FAQs
[![NPM Version][npm-image]][npm-url] [![license][license-image]][license-url] [![GitHub Actions][github-image]][github-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![TypeScript Style Guide][gts-image]][gts-url] [![standard-readme compliant](http
The npm package promise-cache-retry receives a total of 0 weekly downloads. As such, promise-cache-retry popularity was classified as not popular.
We found that promise-cache-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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.