Loading homepage
Create an automatically running interval with pause, resume, and terminal stop controls.
Input: const interval = resumableInterval(() => console.log("tick"), 1000); interval.pause(); interval.resume(); interval.stop(); Output: Resume waits 1000 ms for the next tick; stop permanently cancels further ticks.
Input: interval.isRunning Output: true while active; false after pause or stop.
Implement the exported function in index.js or index.ts. Tests provide fixtures for the required behavior.