Bump to v3.10.0.

This commit is contained in:
jdalton
2015-06-14 22:21:58 -07:00
parent 6ee2b9a7b8
commit 4bd2890bbd
121 changed files with 777 additions and 649 deletions

View File

@@ -4,13 +4,6 @@ import isObject from '../lang/isObject';
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/** Used as an internal `_.debounce` options object by `_.throttle`. */
var debounceOptions = {
'leading': false,
'maxWait': 0,
'trailing': false
};
/**
* Creates a throttled function that only invokes `func` at most once per
* every `wait` milliseconds. The throttled function comes with a `cancel`
@@ -63,10 +56,7 @@ function throttle(func, wait, 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);
return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });
}
export default throttle;