@cripty2001/utils 0.0.21 → 0.0.23

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
@@ -9,7 +9,7 @@ export type AtLeastOne<T> = {
9
9
  export type ExactlyOne<T> = {
10
10
  [K in keyof T]: Pick<T, K> & Partial<Record<Exclude<keyof T, K>, never>>;
11
11
  }[keyof T];
12
- export type RequireAll<T> = T extends ExactlyOne<infer U> ? ExactlyOne<Required<U>> : never;
12
+ export type AllRequired<T> = T extends ExactlyOne<infer U> ? ExactlyOne<Required<U>> : never;
13
13
  export declare function getRandom(_alphabeth: string, length: number): string;
14
14
  export declare function getRandomId(length?: number): string;
15
15
  export declare function getRandomOtp(length?: number, char?: boolean): string;
@@ -89,9 +89,7 @@ function useAsync(f, data, debouce = 200) {
89
89
  // Initing reactive input
90
90
  const [input, setInput] = whispr_1.Whispr.create(data);
91
91
  (0, react_1.useEffect)(() => {
92
- if ((0, lodash_1.isEqual)(data, input.value))
93
- return;
94
- setInput(data);
92
+ setInput(data); // Debouncing already handled by dispatcher
95
93
  }, [data, input, setInput]);
96
94
  // Initing dispatcher
97
95
  const dispatcher = (0, react_1.useRef)(new Dispatcher_1.Dispatcher(input, f, debouce)).current;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cripty2001/utils",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "Internal Set of utils. If you need them use them, otherwise go to the next package ;)",
5
5
  "homepage": "https://github.com/cripty2001/utils#readme",
6
6
  "bugs": {