code: function throttle(func) {
    var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
  
    var wait = false;
  
    return function () {
      if (!wait) {
        func.call();
        wait = true;
        setTimeout(function () {
          wait = false;
        }, limit);
      }
    };
  }
docs: Prevents a function from firing too often.
  @param  {Function} func  the function to throttle
  @param  {Number}   limit the amount of milliseconds to wait between calls
  @return {Function}       function to check if the function should be called