Skip to content

Commit

Permalink
add comment about debounce function
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonlsouza committed Aug 9, 2023
1 parent 835bbd4 commit 38c6da7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bigbluebutton-html5/imports/utils/debounce.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Debounce function, includes leading and trailing options (lodash-like)
* @param {Function} func - function to be debounced
* @param {Number} delay - delay in milliseconds
* @param {Object} options - options object
* @param {Boolean} options.leading - whether to invoke the function on the leading edge
* @param {Boolean} options.trailing - whether to invoke the function on the trailing edge
* @returns {Function} - debounced function
*/
export function debounce(func, delay, options = {}) {
let timeoutId;
let lastArgs;
Expand Down

0 comments on commit 38c6da7

Please sign in to comment.