react-simplikit 0.0.32 → 0.0.34

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.
@@ -23,6 +23,11 @@ type UseCounterReturn = {
23
23
  * @param {number} [options.step=1] - Value to increment or decrement by. Defaults to 1.
24
24
  *
25
25
  * @returns {UseCounterReturn} An object with count value and control functions.
26
+ * - count `number` - The current count value;
27
+ * - increment `() => void` - A function to increment the count;
28
+ * - decrement `() => void` - A function to decrement the count;
29
+ * - reset `() => void` - A function to reset the count to the initial value;
30
+ * - setCount `(value: number | ((prev: number) => number)) => void` - A function to set the count to a specific value or a function that returns a new value;
26
31
  *
27
32
  * @example
28
33
  * import { useCounter } from 'react-simplikit';
@@ -118,7 +118,6 @@ function throttle(func, throttleMs, { edges = ["leading", "trailing"] } = {}) {
118
118
  if (Date.now() - pendingAt >= throttleMs) {
119
119
  pendingAt = Date.now();
120
120
  debounced.cancel();
121
- debounced(...args);
122
121
  }
123
122
  }
124
123
  debounced(...args);
package/dist/index.cjs CHANGED
@@ -753,7 +753,6 @@ function throttle(func, throttleMs, { edges = ["leading", "trailing"] } = {}) {
753
753
  if (Date.now() - pendingAt >= throttleMs) {
754
754
  pendingAt = Date.now();
755
755
  debounced.cancel();
756
- debounced(...args);
757
756
  }
758
757
  }
759
758
  debounced(...args);
@@ -23,6 +23,11 @@ type UseCounterReturn = {
23
23
  * @param {number} [options.step=1] - Value to increment or decrement by. Defaults to 1.
24
24
  *
25
25
  * @returns {UseCounterReturn} An object with count value and control functions.
26
+ * - count `number` - The current count value;
27
+ * - increment `() => void` - A function to increment the count;
28
+ * - decrement `() => void` - A function to decrement the count;
29
+ * - reset `() => void` - A function to reset the count to the initial value;
30
+ * - setCount `(value: number | ((prev: number) => number)) => void` - A function to set the count to a specific value or a function that returns a new value;
26
31
  *
27
32
  * @example
28
33
  * import { useCounter } from 'react-simplikit';
@@ -92,7 +92,6 @@ function throttle(func, throttleMs, { edges = ["leading", "trailing"] } = {}) {
92
92
  if (Date.now() - pendingAt >= throttleMs) {
93
93
  pendingAt = Date.now();
94
94
  debounced.cancel();
95
- debounced(...args);
96
95
  }
97
96
  }
98
97
  debounced(...args);
package/esm/index.js CHANGED
@@ -703,7 +703,6 @@ function throttle(func, throttleMs, { edges = ["leading", "trailing"] } = {}) {
703
703
  if (Date.now() - pendingAt >= throttleMs) {
704
704
  pendingAt = Date.now();
705
705
  debounced.cancel();
706
- debounced(...args);
707
706
  }
708
707
  }
709
708
  debounced(...args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-simplikit",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "main": "./dist/index.cjs",
5
5
  "type": "module",
6
6
  "sideEffects": false,