Please only use this in the browser, not in node.
npm install timers-ref
var timers =timerstimersvar timeout = timerstimersvar interval = timerstimers
If you want to listen to
process.on('exit') to know when there are no
setInterval timers in the event queue, do this:
Note one important difference: This won't emit process.on('exit') if no setTimeouts or setIntervals are called. Needs at least one call to get things going.
MIT. Copyright (c) Feross Aboukhadijeh.