function getUnscheduler () {
  // TODO: Create a map of IDs if the schedules array gets large.
  return function (id) {
    for (var i = 0, l = schedules.length; i < l; i++) {
      var schedule = schedules[i]
      if (schedule.id === id) {
        schedules.splice(i, 1)
        break
      }
    }
  }
}
function getUnscheduler () {
  
  return function (id) {
    for (var i = 0, l = schedules.length; i < l; i++) {
      var schedule = schedules[i]
      if (schedule.id === id) {
        schedules.splice(i, 1)
        break
      }
    }
  }
}
function getUnscheduler ( ) { // TODO: Create a map of IDs if the schedules array gets large. return function ( id ) { for ( var i = 0 , l = schedules . length ; i < l ; i ++ ) { var schedule = schedules [ i ] if ( schedule . id === id ) { schedules . splice ( i , 1 ) break } } } }
The `getUnscheduler` returns mocks for `clearTimeout` and `clearInterval`.
The getUnscheduler returns mocks for clearTimeout and clearInterval .