perfect-debounce 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -18,9 +18,9 @@ Debounce functions
|
|
|
18
18
|
@returns A function that delays calling `fn` until after `wait` milliseconds have elapsed since the last time it was called.
|
|
19
19
|
@example
|
|
20
20
|
```
|
|
21
|
-
import
|
|
21
|
+
import { debounce } from 'perfect-debounce';
|
|
22
22
|
const expensiveCall = async input => input;
|
|
23
|
-
const debouncedFn =
|
|
23
|
+
const debouncedFn = debounce(expensiveCall, 200);
|
|
24
24
|
for (const number of [1, 2, 3]) {
|
|
25
25
|
console.log(await debouncedFn(number));
|
|
26
26
|
}
|