From 1b1bb79b051e79595d0b7636969cc3d987eecacb Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 1 Oct 2017 19:55:40 -0700 Subject: [PATCH] Commit and whitespace nits in debounce. --- debounce.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debounce.js b/debounce.js index 5e27275a6..4ad3a4df9 100644 --- a/debounce.js +++ b/debounce.js @@ -51,9 +51,9 @@ import isObject from './isObject.js' * * // Cancel the trailing debounced invocation. * jQuery(window).on('popstate', debounced.cancel) - * + * * // Check for pending invocations. - * const status = debounced.pending() ? "Pending…" : "Ready" + * const status = debounced.pending() ? "Pending..." : "Ready" */ function debounce(func, wait, options) { let lastArgs, @@ -151,7 +151,7 @@ function debounce(func, wait, options) { function flush() { return timerId === undefined ? result : trailingEdge(Date.now()) } - + function pending() { return timerId !== undefined }