
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
class-with-resources
Advanced tools
A class that has resources specified on the webcomponents, stylesheets and scripts attributes. Loaded using the loadResources method.
Cacher is an NPM module that serves to cache a value received from a promise, it allows you to specify the lifespan of cached value (defaults to 2000ms), if the value is requested another time before the cache has 'died' the cached value will be returned.
When the Cacher is executed it first looks for a cached value using the arguments provided (same input => same output), if found, it returns the cache, if not found, it executes the async function and caches the value it resolves with and returns this value to the user.
Run npm install
Run npm test
The Cacher module gives you a class when imported, you can instantiate or extends this class to have the execute method, and optionally change the lifespan.
import Cacher from 'frntnd-cacher';
const cacher = new Cacher({
lifespan: 3000,
execute(...args) {
return new Promise(resolve => {
// some async stuff that returns with the value that should be cached.
resolve(data);
});
}
});
FAQs
A class that has resources specified on the webcomponents, stylesheets and scripts attributes. Loaded using the loadResources method.
The npm package class-with-resources receives a total of 23 weekly downloads. As such, class-with-resources popularity was classified as not popular.
We found that class-with-resources 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.