Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
timer-wheel
Advanced tools
timer-wheel
is a JavaScript library for efficiently managing a large amount
of timed actions. It allows you to schedule actions after a certain delay and
then control when to advance and run actions where the delay has passed.
This implementation is designed for larger delays and has a minimum delay of 1000 ms.
import { TimerWheel } from 'timer-wheel';
const wheel = new TimerWheel();
wheel.schedule(() => {
console.log('Action invoked');
}, 1500 /* ms */)
// Call `advance()` to advance the wheel and run actions
setInterval(() => {
wheel.advance();
}, 1000);
This library is useful for things like expiring caches with lazy expiration,
instead of checking if every cache item should be expired use a wheel to queue
removal actions and call advance
before every get/set. This is how
Transitory implements expiring
caches.
FAQs
Timer wheel for managing expiration of a large amount of items
The npm package timer-wheel receives a total of 220 weekly downloads. As such, timer-wheel popularity was classified as not popular.
We found that timer-wheel 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.