Timer management to clear large batches of timers.
$ component install component/timers
In the following example the last two timers will not fire.
varTimers=require('timers');vartimers=newTimers;timers.timeout(function(){console.log('one');},1000);timers.timeout(function(){console.log('two');},2000);timers.timeout(function(){console.log('three');},3000);setTimeout(function(){timers.clear();},1500);Initialize a new timer set with optional ids.
Add timeout fn.
Add interval fn.
Clear all timers.
MIT