@pawover/kit 0.0.0-alpha.2 → 0.0.0-alpha.20

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.
Files changed (57) hide show
  1. package/dist/enums.d.ts +24 -0
  2. package/dist/enums.js +24 -0
  3. package/dist/hooks-alova.d.ts +22 -0
  4. package/dist/hooks-alova.js +38 -0
  5. package/dist/hooks-react.d.ts +87 -0
  6. package/dist/hooks-react.js +295 -0
  7. package/dist/index.d.ts +382 -0
  8. package/dist/index.js +1123 -2
  9. package/dist/vite.d.ts +12 -0
  10. package/dist/vite.js +21 -0
  11. package/dist/zod.d.ts +104 -0
  12. package/dist/zod.js +137 -0
  13. package/metadata.json +139 -0
  14. package/package.json +46 -42
  15. package/dist/enums/index.js +0 -20
  16. package/dist/hooks/react/index.js +0 -5
  17. package/dist/hooks/react/useCreation.js +0 -11
  18. package/dist/hooks/react/useLatest.js +0 -6
  19. package/dist/hooks/react/useMount.js +0 -29
  20. package/dist/hooks/react/useResponsive.js +0 -59
  21. package/dist/hooks/react/useUnmount.js +0 -17
  22. package/dist/types/enums/index.d.ts +0 -20
  23. package/dist/types/hooks/react/index.d.ts +0 -5
  24. package/dist/types/hooks/react/useCreation.d.ts +0 -2
  25. package/dist/types/hooks/react/useLatest.d.ts +0 -1
  26. package/dist/types/hooks/react/useMount.d.ts +0 -11
  27. package/dist/types/hooks/react/useResponsive.d.ts +0 -16
  28. package/dist/types/hooks/react/useUnmount.d.ts +0 -6
  29. package/dist/types/index.d.ts +0 -2
  30. package/dist/types/utils/array.d.ts +0 -76
  31. package/dist/types/utils/index.d.ts +0 -6
  32. package/dist/types/utils/object.d.ts +0 -53
  33. package/dist/types/utils/string.d.ts +0 -13
  34. package/dist/types/utils/to.d.ts +0 -5
  35. package/dist/types/utils/tree/index.d.ts +0 -6
  36. package/dist/types/utils/tree/rowsToTree.d.ts +0 -10
  37. package/dist/types/utils/tree/treeFilter.d.ts +0 -6
  38. package/dist/types/utils/tree/treeFind.d.ts +0 -8
  39. package/dist/types/utils/tree/treeForEach.d.ts +0 -5
  40. package/dist/types/utils/tree/treeMap.d.ts +0 -6
  41. package/dist/types/utils/tree/treeToRows.d.ts +0 -9
  42. package/dist/types/utils/tree/types.d.ts +0 -24
  43. package/dist/types/utils/typeof.d.ts +0 -29
  44. package/dist/utils/array.js +0 -196
  45. package/dist/utils/index.js +0 -6
  46. package/dist/utils/object.js +0 -138
  47. package/dist/utils/string.js +0 -70
  48. package/dist/utils/to.js +0 -16
  49. package/dist/utils/tree/index.js +0 -6
  50. package/dist/utils/tree/rowsToTree.js +0 -35
  51. package/dist/utils/tree/treeFilter.js +0 -92
  52. package/dist/utils/tree/treeFind.js +0 -82
  53. package/dist/utils/tree/treeForEach.js +0 -60
  54. package/dist/utils/tree/treeMap.js +0 -79
  55. package/dist/utils/tree/treeToRows.js +0 -13
  56. package/dist/utils/tree/types.js +0 -10
  57. package/dist/utils/typeof.js +0 -114
@@ -1,114 +0,0 @@
1
- const prototypes = {
2
- string: "[object String]",
3
- number: "[object Number]",
4
- boolean: "[object Boolean]",
5
- object: "[object Object]",
6
- array: "[object Array]",
7
- bigInt: "[object BigInt]",
8
- symbol: "[object Symbol]",
9
- function: "[object Function]",
10
- generatorFunction: "[object GeneratorFunction]",
11
- asyncFunction: "[object AsyncFunction]",
12
- promise: "[object Promise]",
13
- null: "[object Null]",
14
- undefined: "[object Undefined]",
15
- date: "[object Date]",
16
- regExp: "[object RegExp]",
17
- error: "[object Error]",
18
- file: "[object File]",
19
- map: "[object Map]",
20
- weakMap: "[object WeakMap]",
21
- set: "[object Set]",
22
- weakSet: "[object WeakSet]",
23
- window: "[object Window]",
24
- webSocket: "[object WebSocket]",
25
- URLSearchParams: "[object URLSearchParams]",
26
- };
27
- function resolvePrototypeString(value) {
28
- return Object.prototype.toString.call(value);
29
- }
30
- export function isString(value) {
31
- return resolvePrototypeString(value) === prototypes.string;
32
- }
33
- export function isNumber(value) {
34
- return resolvePrototypeString(value) === prototypes.number;
35
- }
36
- export function isBoolean(value) {
37
- return resolvePrototypeString(value) === prototypes.boolean;
38
- }
39
- export function isObject(value) {
40
- return resolvePrototypeString(value) === prototypes.object;
41
- }
42
- export function isArray(value) {
43
- return resolvePrototypeString(value) === prototypes.array;
44
- }
45
- export function isBigInt(value) {
46
- return resolvePrototypeString(value) === prototypes.bigInt;
47
- }
48
- export function isSymbol(value) {
49
- return resolvePrototypeString(value) === prototypes.symbol;
50
- }
51
- export function isFunction(value) {
52
- const prototypeList = [prototypes.function, prototypes.generatorFunction, prototypes.asyncFunction];
53
- return prototypeList.includes(resolvePrototypeString(value));
54
- }
55
- export function isGeneratorFunction(value) {
56
- return resolvePrototypeString(value) === prototypes.generatorFunction;
57
- }
58
- export function isAsyncFunction(value) {
59
- return resolvePrototypeString(value) === prototypes.asyncFunction;
60
- }
61
- export function isPromise(value) {
62
- return resolvePrototypeString(value) === prototypes.promise;
63
- }
64
- export function isPromiseLike(value) {
65
- return isPromise(value) || (isObject(value) && isFunction(value["then"]));
66
- }
67
- export function isNull(value) {
68
- return resolvePrototypeString(value) === prototypes.null;
69
- }
70
- export function isUndefined(value) {
71
- return resolvePrototypeString(value) === prototypes.undefined;
72
- }
73
- export function isDate(value) {
74
- return resolvePrototypeString(value) === prototypes.date;
75
- }
76
- export function isRegExp(value) {
77
- return resolvePrototypeString(value) === prototypes.regExp;
78
- }
79
- export function isError(value) {
80
- return resolvePrototypeString(value) === prototypes.error;
81
- }
82
- export function isFile(value) {
83
- return resolvePrototypeString(value) === prototypes.file;
84
- }
85
- export function isMap(value) {
86
- return resolvePrototypeString(value) === prototypes.map;
87
- }
88
- export function isWeakMap(value) {
89
- return resolvePrototypeString(value) === prototypes.weakMap;
90
- }
91
- export function isSet(value) {
92
- return resolvePrototypeString(value) === prototypes.set;
93
- }
94
- export function isWeakSet(value) {
95
- return resolvePrototypeString(value) === prototypes.weakSet;
96
- }
97
- export function isWindow(value) {
98
- return resolvePrototypeString(value) === prototypes.window;
99
- }
100
- export function isWebSocket(value) {
101
- return resolvePrototypeString(value) === prototypes.webSocket;
102
- }
103
- export function isURLSearchParams(value) {
104
- return resolvePrototypeString(value) === prototypes.URLSearchParams;
105
- }
106
- export function isClass(value) {
107
- return resolvePrototypeString(value).startsWith("class ");
108
- }
109
- export function isInteger(value) {
110
- return Number.isInteger(value);
111
- }
112
- export function isIterable(value) {
113
- return isObject(value) && Symbol.iterator in value;
114
- }