@aitronos/freddy-plugins 0.1.37 → 0.1.38

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 CHANGED
@@ -139,6 +139,21 @@ export declare const copyToClipboard: (textToCopy: string) => Promise<void>;
139
139
 
140
140
  export declare const daysInMonth: number;
141
141
 
142
+ /**
143
+ * Creates a debounced version of a function that delays invoking it
144
+ * until after `wait` milliseconds have elapsed since the last time it was called.
145
+ *
146
+ * @template T - The type of the original function.
147
+ * @param fn - The function to debounce.
148
+ * @param wait - The number of milliseconds to delay. Defaults to 300ms.
149
+ * @returns A debounced version of the original function.
150
+ *
151
+ * @example
152
+ * const debouncedFn = debounce(() => console.log('Called!'), 500)
153
+ * window.addEventListener('resize', debouncedFn)
154
+ */
155
+ export declare function debounce<T extends (...args: any[]) => void>(fn: T, wait?: number): (...args: Parameters<T>) => void;
156
+
142
157
  /**
143
158
  * Performs a deep comparison between two values to determine if they are equivalent.
144
159
  * This function is similar to Lodash's `isEqual`.