documentcloud/underscore — pull request #1103 by aymanfarhat (2013-05-07 17:28:45+00:00)
Title: Added Interval Function

I added an interval utility function with behavior similar to setInterval yet based on _.delay() and supports a finite number of function calls(repetitions) between each interval. Example: _.interval(function(){
console.log("test");
},100,5);

Executes the function that prints test every 100 milliseconds 5 consecutive times.

I have added a simple test on the function too for a demonstration, would be interested to see this function added to the awesome underscore library. Have a good day!