@daysnap/utils 0.0.6 → 0.0.7

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 (99) hide show
  1. package/es/base64ToBlob.js +0 -29
  2. package/es/blobToBase64.js +0 -3
  3. package/es/compareVersion.js +0 -1
  4. package/es/createHexColorByHash.js +0 -5
  5. package/es/downloadFile.js +0 -7
  6. package/es/filterBankCardNo.js +0 -5
  7. package/es/filterEmoji.js +0 -6
  8. package/es/filterIdCard.js +0 -2
  9. package/es/filterName.js +0 -3
  10. package/es/filterPhone.js +0 -2
  11. package/es/formatAmount.js +0 -6
  12. package/es/formatDate.js +0 -4
  13. package/es/getBlobByUrl.js +0 -4
  14. package/es/getImageInfo.js +0 -3
  15. package/es/getVideoInfo.js +0 -3
  16. package/es/isAndroid.js +0 -2
  17. package/es/isEmail.js +0 -2
  18. package/es/isIOS.js +0 -2
  19. package/es/isIdCard.js +0 -2
  20. package/es/isMobile.js +0 -2
  21. package/es/isObject.js +0 -2
  22. package/es/isPhone.js +0 -2
  23. package/es/isPromise.js +1 -4
  24. package/es/isRegExp.js +0 -4
  25. package/es/omit.js +0 -2
  26. package/es/parsePath.js +0 -3
  27. package/es/pick.js +0 -3
  28. package/es/replaceCrlf.js +0 -3
  29. package/lib/base64ToBlob.js +2 -60
  30. package/lib/blobToBase64.js +0 -4
  31. package/lib/compareVersion.js +3 -5
  32. package/lib/createHexColorByHash.js +0 -8
  33. package/lib/downloadFile.js +0 -12
  34. package/lib/filterBankCardNo.js +0 -8
  35. package/lib/filterEmoji.js +0 -10
  36. package/lib/filterIdCard.js +0 -2
  37. package/lib/filterName.js +0 -4
  38. package/lib/filterPhone.js +0 -2
  39. package/lib/formatAmount.js +0 -10
  40. package/lib/formatDate.js +0 -8
  41. package/lib/getBlobByUrl.js +0 -6
  42. package/lib/getImageInfo.js +0 -4
  43. package/lib/getVideoInfo.js +0 -4
  44. package/lib/index.js +0 -6
  45. package/lib/isAndroid.js +0 -2
  46. package/lib/isEmail.js +0 -2
  47. package/lib/isIOS.js +0 -2
  48. package/lib/isIdCard.js +0 -2
  49. package/lib/isMobile.js +0 -2
  50. package/lib/isObject.js +0 -2
  51. package/lib/isPhone.js +0 -2
  52. package/lib/isPromise.js +1 -5
  53. package/lib/isRegExp.js +0 -6
  54. package/lib/omit.js +2 -6
  55. package/lib/parsePath.js +0 -4
  56. package/lib/pick.js +0 -4
  57. package/lib/replaceCrlf.js +0 -4
  58. package/lib/storage/factory.js +2 -2
  59. package/package.json +13 -24
  60. package/dist/base64ToBlob.d.ts +0 -4
  61. package/dist/blobToBase64.d.ts +0 -4
  62. package/dist/compareVersion.d.ts +0 -7
  63. package/dist/compressImage.d.ts +0 -4
  64. package/dist/createHexColorByHash.d.ts +0 -4
  65. package/dist/downloadFile.d.ts +0 -6
  66. package/dist/filterBankCardNo.d.ts +0 -4
  67. package/dist/filterEmoji.d.ts +0 -4
  68. package/dist/filterIdCard.d.ts +0 -4
  69. package/dist/filterName.d.ts +0 -4
  70. package/dist/filterPhone.d.ts +0 -6
  71. package/dist/formatAmount.d.ts +0 -4
  72. package/dist/formatDate.d.ts +0 -4
  73. package/dist/getBlobByUrl.d.ts +0 -4
  74. package/dist/getImageInfo.d.ts +0 -4
  75. package/dist/getVideoInfo.d.ts +0 -4
  76. package/dist/index.d.ts +0 -38
  77. package/dist/index.js +0 -604
  78. package/dist/isAndroid.d.ts +0 -4
  79. package/dist/isEmail.d.ts +0 -4
  80. package/dist/isEmpty.d.ts +0 -4
  81. package/dist/isFunction.d.ts +0 -4
  82. package/dist/isIOS.d.ts +0 -4
  83. package/dist/isIdCard.d.ts +0 -4
  84. package/dist/isMobile.d.ts +0 -4
  85. package/dist/isNull.d.ts +0 -4
  86. package/dist/isObject.d.ts +0 -4
  87. package/dist/isPhone.d.ts +0 -4
  88. package/dist/isPromise.d.ts +0 -4
  89. package/dist/isRegExp.d.ts +0 -4
  90. package/dist/isString.d.ts +0 -4
  91. package/dist/isUndefined.d.ts +0 -4
  92. package/dist/omit.d.ts +0 -4
  93. package/dist/parseError.d.ts +0 -4
  94. package/dist/parsePath.d.ts +0 -4
  95. package/dist/pick.d.ts +0 -4
  96. package/dist/replaceCrlf.d.ts +0 -4
  97. package/dist/reserve.d.ts +0 -7
  98. package/dist/storage/factory.d.ts +0 -13
  99. package/dist/storage/index.d.ts +0 -26
@@ -1,4 +0,0 @@
1
- /**
2
- * 根据路径解析值
3
- */
4
- export declare function parsePath(obj: Record<string, any>, path: string): Record<string, any>;
package/dist/pick.d.ts DELETED
@@ -1,4 +0,0 @@
1
- /**
2
- * 挑选对象里的某些属性,新对象返回
3
- */
4
- export declare function pick<T extends object, K extends keyof T>(obj: T, fields?: K[]): Pick<T, K>;
@@ -1,4 +0,0 @@
1
- /**
2
- * 替换字符串里面的回车换行
3
- */
4
- export declare function replaceCrlf(val: string, replaceVal: string): string;
package/dist/reserve.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * 值为 ''、undefined、null 则取默认值
3
- * 解决:
4
- * 0 || '--' => '--'
5
- * reserve(0, '--') => 0
6
- */
7
- export declare function reserve(val: any, defaultVal?: any): any;
@@ -1,13 +0,0 @@
1
- export declare function factory(type: 'sessionStorage' | 'localStorage'): {
2
- setItem: <T>(key: string, val: T) => T;
3
- getItem: <T_1>(key: string, defaultVal?: Partial<T_1>) => any;
4
- removeItem: (key: string) => void;
5
- updateItem: <T_2>(key: string, val: Partial<T_2>) => T_2;
6
- clear: () => void;
7
- generate: <T_3>(key: string) => {
8
- setItem: (val: T_3) => T_3;
9
- getItem: (defaultVal?: Partial<T_3>) => any;
10
- removeItem: () => void;
11
- updateItem: (val: Partial<T_3>) => T_3;
12
- };
13
- };
@@ -1,26 +0,0 @@
1
- export declare const cache: {
2
- setItem: <T>(key: string, val: T) => T;
3
- getItem: <T_1>(key: string, defaultVal?: Partial<T_1>) => any;
4
- removeItem: (key: string) => void;
5
- updateItem: <T_2>(key: string, val: Partial<T_2>) => T_2;
6
- clear: () => void;
7
- generate: <T_3>(key: string) => {
8
- setItem: (val: T_3) => T_3;
9
- getItem: (defaultVal?: Partial<T_3>) => any;
10
- removeItem: () => void;
11
- updateItem: (val: Partial<T_3>) => T_3;
12
- };
13
- };
14
- export declare const local: {
15
- setItem: <T>(key: string, val: T) => T;
16
- getItem: <T_1>(key: string, defaultVal?: Partial<T_1>) => any;
17
- removeItem: (key: string) => void;
18
- updateItem: <T_2>(key: string, val: Partial<T_2>) => T_2;
19
- clear: () => void;
20
- generate: <T_3>(key: string) => {
21
- setItem: (val: T_3) => T_3;
22
- getItem: (defaultVal?: Partial<T_3>) => any;
23
- removeItem: () => void;
24
- updateItem: (val: Partial<T_3>) => T_3;
25
- };
26
- };