mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Add more _.debounce and _.throttle tests.
Former-commit-id: db3cb30a8eac82850a056f85d0c363e752d10027
This commit is contained in:
10
dist/lodash.underscore.js
vendored
10
dist/lodash.underscore.js
vendored
@@ -3461,9 +3461,9 @@
|
||||
if (options === true) {
|
||||
var leading = true;
|
||||
trailing = false;
|
||||
} else if (options) {
|
||||
} else if (options && objectTypes[typeof options]) {
|
||||
leading = options.leading;
|
||||
trailing = options.trailing;
|
||||
trailing = 'trailing' in options ? options.trailing : trailing;
|
||||
}
|
||||
return function() {
|
||||
var isLeading = leading && !timeoutId;
|
||||
@@ -3649,9 +3649,9 @@
|
||||
}
|
||||
if (options === false) {
|
||||
leading = false;
|
||||
} else if (options) {
|
||||
leading = options.leading;
|
||||
trailing = options.trailing;
|
||||
} else if (options && objectTypes[typeof options]) {
|
||||
leading = 'leading' in options ? options.leading : leading;
|
||||
trailing = 'trailing' in options ? options.trailing : trailing;
|
||||
}
|
||||
return function() {
|
||||
var now = new Date;
|
||||
|
||||
Reference in New Issue
Block a user