@whitesev/utils 1.0.4 → 1.0.6

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 (60) hide show
  1. package/dist/index.amd.js +5885 -1817
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.cjs.js +5533 -1467
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.esm.js +5531 -1467
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.iife.js +5886 -1817
  8. package/dist/index.iife.js.map +1 -1
  9. package/dist/index.system.js +5897 -1826
  10. package/dist/index.system.js.map +1 -1
  11. package/dist/index.umd.js +5889 -1817
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/src/Dictionary.d.ts +82 -0
  14. package/dist/src/Hooks.d.ts +11 -0
  15. package/dist/src/Httpx.d.ts +1201 -0
  16. package/dist/src/LockFunction.d.ts +31 -0
  17. package/dist/src/Log.d.ts +96 -0
  18. package/dist/src/Progress.d.ts +37 -0
  19. package/dist/src/UtilsGMMenu.d.ts +156 -0
  20. package/dist/src/index.d.ts +20 -27
  21. package/dist/src/indexedDB.d.ts +73 -0
  22. package/dist/src/tryCatch.d.ts +31 -0
  23. package/package.json +36 -37
  24. package/rollup.config.js +0 -3
  25. package/src/Dictionary.ts +152 -0
  26. package/src/{Hooks/Hooks.js → Hooks.ts} +31 -17
  27. package/src/{Httpx/index.d.ts → Httpx.ts} +837 -46
  28. package/src/LockFunction.ts +62 -0
  29. package/src/Log.ts +281 -0
  30. package/src/Progress.ts +143 -0
  31. package/src/UtilsGMMenu.ts +681 -0
  32. package/src/index.ts +17 -29
  33. package/src/indexedDB.ts +421 -0
  34. package/src/tryCatch.ts +107 -0
  35. package/tsconfig.json +1 -1
  36. package/dist/src/Dictionary/Dictionary.d.ts +0 -85
  37. package/dist/src/Hooks/Hooks.d.ts +0 -5
  38. package/dist/src/Httpx/Httpx.d.ts +0 -50
  39. package/dist/src/LockFunction/LockFunction.d.ts +0 -16
  40. package/dist/src/Log/Log.d.ts +0 -66
  41. package/dist/src/Progress/Progress.d.ts +0 -6
  42. package/dist/src/UtilsGMMenu/UtilsGMMenu.d.ts +0 -119
  43. package/dist/src/indexedDB/indexedDB.d.ts +0 -165
  44. package/dist/src/tryCatch/tryCatch.d.ts +0 -31
  45. package/src/Dictionary/Dictionary.js +0 -157
  46. package/src/Dictionary/index.d.ts +0 -52
  47. package/src/Hooks/index.d.ts +0 -16
  48. package/src/Httpx/Httpx.js +0 -747
  49. package/src/LockFunction/LockFunction.js +0 -35
  50. package/src/LockFunction/index.d.ts +0 -47
  51. package/src/Log/Log.js +0 -256
  52. package/src/Log/index.d.ts +0 -91
  53. package/src/Progress/Progress.js +0 -98
  54. package/src/Progress/index.d.ts +0 -30
  55. package/src/UtilsGMMenu/UtilsGMMenu.js +0 -464
  56. package/src/UtilsGMMenu/index.d.ts +0 -224
  57. package/src/indexedDB/index.d.ts +0 -128
  58. package/src/indexedDB/indexedDB.js +0 -355
  59. package/src/tryCatch/index.d.ts +0 -6
  60. package/src/tryCatch/tryCatch.js +0 -100
@@ -1,52 +0,0 @@
1
- declare interface UtilsDictionaryConstructor<K extends any, V extends any> {
2
- /** 检查是否有某一个键 */
3
- has(key: K): boolean;
4
- /** 检查已有的键中是否以xx开头 */
5
- startsWith(key: K): boolean;
6
- /** 获取以xx开头的键的值 */
7
- getStartsWith(key: K): V;
8
- /** 为字典添加某一个值 */
9
- set(key: K, val: V): void;
10
- /** 删除某一个键 */
11
- delete(key: K): boolean;
12
- /** 获取某个键的值 */
13
- get(key: K): V;
14
- /** 返回字典中的所有值 */
15
- values(): V[];
16
- /** 清空字典 */
17
- clear(): void;
18
- /** 获取字典的长度 */
19
- size(): number;
20
- /** 获取字典所有的键 */
21
- keys(): K[];
22
- /** 返回字典本身 */
23
- getItems(): Record<K, V>;
24
- /** 合并另一个字典 */
25
- concat(data: UtilsDictionaryConstructor<K, V>): void;
26
- /**
27
- * 迭代器
28
- */
29
- entries(): IterableIterator<[K, V]>;
30
- /**
31
- * 循环字典
32
- */
33
- forEach(
34
- callbackfn: (
35
- value: V,
36
- key: K,
37
- dictionary: UtilsDictionaryConstructor<K, V>
38
- ) => void
39
- ): void;
40
- /**
41
- * 可迭代
42
- */
43
- [Symbol.iterator](): IterableIterator<[K, V]>;
44
- /**
45
- * .toString()和.toLocaleString()输出的字符串
46
- */
47
- [Symbol.toStringTag](): string;
48
- /**
49
- * 同this.size()
50
- */
51
- get length(): number;
52
- }
@@ -1,16 +0,0 @@
1
- /** Hook */
2
- declare interface UtilsHooksConstructor {
3
- /**
4
- * 在Function原型上添加自定义方法.hook和.unhook
5
- */
6
- initEnv(): void;
7
- /**
8
- * 删除在Function原型上添加的自定义方法.hook和.unhook
9
- */
10
- cleanEnv(): void;
11
- }
12
-
13
- /** Hook */
14
- declare interface UtilsHooks {
15
- new (): UtilsHooksConstructor;
16
- }