mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Add maxWait option to _.debounce and implement _.throttle by way of _.debounce. [closes #285]
Former-commit-id: 63b41aac298e5fa89f7922e84b2ed0d5c6545bd3
This commit is contained in:
7
build.js
7
build.js
@@ -167,7 +167,7 @@
|
||||
'sortedIndex': ['createCallback', 'identity'],
|
||||
'tap': ['value'],
|
||||
'template': ['defaults', 'escape', 'escapeStringChar', 'keys', 'values'],
|
||||
'throttle': ['isObject'],
|
||||
'throttle': ['debounce'],
|
||||
'times': ['createCallback'],
|
||||
'toArray': ['isString', 'slice', 'values'],
|
||||
'transform': ['createCallback', 'createObject', 'forOwn', 'isArray'],
|
||||
@@ -3342,6 +3342,11 @@
|
||||
// remove `templateSettings` assignment
|
||||
source = source.replace(/(?:\n +\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)?\n *lodash\.templateSettings[\s\S]+?};\n/, '');
|
||||
}
|
||||
if (isRemoved(source, 'throttle')) {
|
||||
_.each(['leading', 'maxWait', 'trailing'], function(prop) {
|
||||
source = removeFromGetObject(source, prop);
|
||||
});
|
||||
}
|
||||
if (isRemoved(source, 'value')) {
|
||||
source = removeFunction(source, 'chain');
|
||||
source = removeFunction(source, 'wrapperToString');
|
||||
|
||||
Reference in New Issue
Block a user