Tiny JS utility for managing multiple timeouts and intervals
Tiny JS utility for managing multiple timeouts and intervals. Timebot provides a centralized and organized way of managing timed asynchronous functions. Also, since it will only run one interval on the system, it can be a lot more efficient than running separate intervals.
//to set an ever looping timeout (interval)timebot;//to set a timeout to execute 3 timestimebot;//create a timeout with a tag (for organization)timebot;//pause all timeoutstimebot;//resume timeoutstimebot;//only pause timeouts that are tagged 'tag1' - pause, resume, and clear can all take a tagtimebot;//clear all timeoutstimebotclear;