Skip to content

Commit

Permalink
Commit and whitespace nits in debounce.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Oct 2, 2017
1 parent 6ad829f commit 1b1bb79
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions debounce.js
Expand Up @@ -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,
Expand Down Expand Up @@ -151,7 +151,7 @@ function debounce(func, wait, options) {
function flush() {
return timerId === undefined ? result : trailingEdge(Date.now())
}

function pending() {
return timerId !== undefined
}
Expand Down

0 comments on commit 1b1bb79

Please sign in to comment.