mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Fixed documentation for debounce
This commit is contained in:
@@ -6947,13 +6947,13 @@
|
|||||||
* jQuery('#postbox').on('click', _.debounce(sendMail, 300, {
|
* jQuery('#postbox').on('click', _.debounce(sendMail, 300, {
|
||||||
* 'leading': true,
|
* 'leading': true,
|
||||||
* 'trailing': false
|
* 'trailing': false
|
||||||
* });
|
* }));
|
||||||
*
|
*
|
||||||
* // ensure `batchLog` is invoked once after 1 second of debounced calls
|
* // ensure `batchLog` is invoked once after 1 second of debounced calls
|
||||||
* var source = new EventSource('/stream');
|
* var source = new EventSource('/stream');
|
||||||
* jQuery(source).on('message', _.debounce(batchLog, 250, {
|
* jQuery(source).on('message', _.debounce(batchLog, 250, {
|
||||||
* 'maxWait': 1000
|
* 'maxWait': 1000
|
||||||
* }, false);
|
* }));
|
||||||
*
|
*
|
||||||
* // cancel a debounced call
|
* // cancel a debounced call
|
||||||
* var todoChanges = _.debounce(batchLog, 1000);
|
* var todoChanges = _.debounce(batchLog, 1000);
|
||||||
|
|||||||
Reference in New Issue
Block a user