{"library":"timer-shim","type":"library","category":null,"description":"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.","language":"javascript","status":"abandoned","version":"0.3.0","tags":["javascript","timer","setTimeout","setInterval","nextTick"],"last_verified":"Wed May 27","install":[{"cmd":"npm install timer-shim","imports":["const timer = require('timer-shim')","timer.timeout(100, fn)","timer.clear(handle)"]},{"cmd":"yarn add timer-shim","imports":[]},{"cmd":"pnpm add timer-shim","imports":[]}],"homepage":null,"github":"https://github.com/chakrit/timer-shim","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/timer-shim","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/timer-shim/compatibility"}}