UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

12 lines (11 loc) 369 B
export default shortOut; /** * Creates a function that'll short out and invoke `identity` instead * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` * milliseconds. * * @private * @param {Function} func The function to restrict. * @returns {Function} Returns the new shortable function. */ declare function shortOut(func: Function): Function;