function throttle(func, wait, options) {
      var leading = true,
          trailing = true;

      if (!isFunction(func)) {
        throw new TypeError;
      }
      if (options === false) {
        leading = false;
      } else if (isObject(options)) {
        leading = 'leading' in options ? options.leading : leading;
        trailing = 'trailing' in options ? options.trailing : trailing;
      }
      debounceOptions.leading = leading;
      debounceOptions.maxWait = wait;
      debounceOptions.trailing = trailing;

      return debounce(func, wait, debounceOptions);
    }
Creates a function that, when executed, will only call the `func` function
at most once per every `wait` milliseconds. Provide an options object to
indicate that `func` should be invoked on the leading and/or trailing edge
of the `wait` timeout. Subsequent calls to the throttled function will
return the result of the last `func` call.

Note: If `leading` and `trailing` options are `true` `func` will be called
on the trailing edge of the timeout only if the the throttled function is
invoked more than once during the `wait` timeout.

@static
@memberOf _
@category Functions
@param {Function} func The function to throttle.
@param {number} wait The number of milliseconds to throttle executions to.
@param {Object} [options] The options object.
@param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout.
@param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout.
@returns {Function} Returns the new throttled function.
@example

// avoid excessively updating the position while scrolling
var throttled = _.throttle(updatePosition, 100);
jQuery(window).on('scroll', throttled);

// execute `renewToken` when the click event is fired, but not more than once every 5 minutes
jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
  'trailing': false
}));