
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
mini-timer is a tiny (570 bytes gzipped) event driven timer without any dependencies that quickly and comfortably counts time for you.
pnpm i mini-timer
The goal of this package is to provide the smallest possible timer package that is easy to use and as versatile as possible.
The timer requires 2 (optional 3) arguments that define the start and end point with the increment between steps. The increment also defines how long each time iteration is per update. The sign of the increment defines whether the timer counts up (+) or down (-).
import timer, { type Timer } from 'mini-timer'
// Standard timer: From 0, count ever 1000ms (1s) indefinitely
const t = timer(0, 1000)
// Standard countdown: From 10s count every second to 0
const t = timer(10_000, -1000, 0)
// From 0, count every 100ms until 10,000ms
const t = timer(0, 100, 10000)
The timer has multiple lifecycle events that can be listened on:
import timer, { type Timer, formatTime } from 'mini-timer'
const t = timer(10_000, -150, 0)
t.on('update', (elapsed) => formatTime(time)) // formats the time on each tick to a format of xx:xx or xx:xx:xx
t.on('start', () => console.log("Hello"))
t.on('pause', () => console.log("Pause"))
t.on('finish', (elapsed) => console.log("Preemptively finished at", elapsed))
t.start()
// <code>
t.pause()
// <code>
t.resume()
// The timer will stop when it reaches to (0), but we can stop it preemptively
t.stop() // The default event of stop is "finish".
// Now, clean everything up with "off"
t.off('update', ...) // Removes callback by reference
t.off('update') // Removes all callbacks
© Torathion 2026
FAQs
The tiniest timer to tick!
We found that mini-timer demonstrated a healthy version release cadence and project activity because the last version was released less than 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.