timer-shim
JSON →Timer-shim is a lightweight wrapper around setTimeout, setInterval, and clearTimeout/clearInterval that facilitates testing time-dependent code without modifying global state. It provides multiple aliases (e.g., timer.timeout, timer.to, timer.t) for convenience and validates arguments against NaN and non-function values. Version 0.3.0 is stable but appears unmaintained (last release 2012). Unlike sinon's fake timers, timer-shim only stubs calls without advancing time. Its key differentiator is simplicity and avoidance of global overrides, making it suitable for isolated unit tests.
Traffic · last 30 days ↑133% vs prev 7d
total hits 16
actors 5 distinct systems
last hit 1d ago AhrefsBot
top countries 🇺🇸 United States · 🇨🇦 Canada · BD · 🇩🇪 Germany · 🇫🇷 France
API endpoints
full doc /v1/registry/timer-shim
install /v1/registry/timer-shim/install
compatibility /v1/registry/timer-shim/compatibility