@daysnap/utils 0.0.1

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 (199) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +12 -0
  3. package/dist/base64ToBlob.d.ts +4 -0
  4. package/dist/blobToBase64.d.ts +4 -0
  5. package/dist/compareVersion.d.ts +7 -0
  6. package/dist/compressImage.d.ts +4 -0
  7. package/dist/createHexColorByHash.d.ts +4 -0
  8. package/dist/downloadFile.d.ts +6 -0
  9. package/dist/filterBankCardNo.d.ts +4 -0
  10. package/dist/filterEmoji.d.ts +4 -0
  11. package/dist/filterIdCard.d.ts +4 -0
  12. package/dist/filterName.d.ts +4 -0
  13. package/dist/filterPhone.d.ts +6 -0
  14. package/dist/formatAmount.d.ts +4 -0
  15. package/dist/formatDate.d.ts +4 -0
  16. package/dist/getBlobByUrl.d.ts +4 -0
  17. package/dist/getImageInfo.d.ts +4 -0
  18. package/dist/getVideoInfo.d.ts +4 -0
  19. package/dist/index.d.ts +38 -0
  20. package/dist/index.js +604 -0
  21. package/dist/isAndroid.d.ts +4 -0
  22. package/dist/isEmail.d.ts +4 -0
  23. package/dist/isEmpty.d.ts +4 -0
  24. package/dist/isFunction.d.ts +4 -0
  25. package/dist/isIOS.d.ts +4 -0
  26. package/dist/isIdCard.d.ts +4 -0
  27. package/dist/isMobile.d.ts +4 -0
  28. package/dist/isNull.d.ts +4 -0
  29. package/dist/isObject.d.ts +4 -0
  30. package/dist/isPhone.d.ts +4 -0
  31. package/dist/isPromise.d.ts +4 -0
  32. package/dist/isRegExp.d.ts +4 -0
  33. package/dist/isString.d.ts +4 -0
  34. package/dist/isUndefined.d.ts +4 -0
  35. package/dist/omit.d.ts +4 -0
  36. package/dist/parseError.d.ts +4 -0
  37. package/dist/parsePath.d.ts +4 -0
  38. package/dist/pick.d.ts +4 -0
  39. package/dist/replaceCrlf.d.ts +4 -0
  40. package/dist/reserve.d.ts +7 -0
  41. package/dist/storage/factory.d.ts +13 -0
  42. package/dist/storage/index.d.ts +26 -0
  43. package/es/base64ToBlob.d.ts +4 -0
  44. package/es/base64ToBlob.js +55 -0
  45. package/es/blobToBase64.d.ts +4 -0
  46. package/es/blobToBase64.js +20 -0
  47. package/es/compareVersion.d.ts +7 -0
  48. package/es/compareVersion.js +58 -0
  49. package/es/compressImage.d.ts +4 -0
  50. package/es/compressImage.js +20 -0
  51. package/es/createHexColorByHash.d.ts +4 -0
  52. package/es/createHexColorByHash.js +72 -0
  53. package/es/downloadFile.d.ts +6 -0
  54. package/es/downloadFile.js +20 -0
  55. package/es/filterBankCardNo.d.ts +4 -0
  56. package/es/filterBankCardNo.js +11 -0
  57. package/es/filterEmoji.d.ts +4 -0
  58. package/es/filterEmoji.js +17 -0
  59. package/es/filterIdCard.d.ts +4 -0
  60. package/es/filterIdCard.js +8 -0
  61. package/es/filterName.d.ts +4 -0
  62. package/es/filterName.js +23 -0
  63. package/es/filterPhone.d.ts +6 -0
  64. package/es/filterPhone.js +11 -0
  65. package/es/formatAmount.d.ts +4 -0
  66. package/es/formatAmount.js +31 -0
  67. package/es/formatDate.d.ts +4 -0
  68. package/es/formatDate.js +44 -0
  69. package/es/getBlobByUrl.d.ts +4 -0
  70. package/es/getBlobByUrl.js +27 -0
  71. package/es/getImageInfo.d.ts +4 -0
  72. package/es/getImageInfo.js +18 -0
  73. package/es/getVideoInfo.d.ts +4 -0
  74. package/es/getVideoInfo.js +20 -0
  75. package/es/index.d.ts +38 -0
  76. package/es/index.js +39 -0
  77. package/es/isAndroid.d.ts +4 -0
  78. package/es/isAndroid.js +8 -0
  79. package/es/isEmail.d.ts +4 -0
  80. package/es/isEmail.js +8 -0
  81. package/es/isEmpty.d.ts +4 -0
  82. package/es/isEmpty.js +9 -0
  83. package/es/isFunction.d.ts +4 -0
  84. package/es/isFunction.js +6 -0
  85. package/es/isIOS.d.ts +4 -0
  86. package/es/isIOS.js +8 -0
  87. package/es/isIdCard.d.ts +4 -0
  88. package/es/isIdCard.js +8 -0
  89. package/es/isMobile.d.ts +4 -0
  90. package/es/isMobile.js +13 -0
  91. package/es/isNull.d.ts +4 -0
  92. package/es/isNull.js +6 -0
  93. package/es/isObject.d.ts +4 -0
  94. package/es/isObject.js +8 -0
  95. package/es/isPhone.d.ts +4 -0
  96. package/es/isPhone.js +8 -0
  97. package/es/isPromise.d.ts +4 -0
  98. package/es/isPromise.js +9 -0
  99. package/es/isRegExp.d.ts +4 -0
  100. package/es/isRegExp.js +10 -0
  101. package/es/isString.d.ts +4 -0
  102. package/es/isString.js +6 -0
  103. package/es/isUndefined.d.ts +4 -0
  104. package/es/isUndefined.js +6 -0
  105. package/es/omit.d.ts +4 -0
  106. package/es/omit.js +17 -0
  107. package/es/parseError.d.ts +4 -0
  108. package/es/parseError.js +28 -0
  109. package/es/parsePath.d.ts +4 -0
  110. package/es/parsePath.js +15 -0
  111. package/es/pick.d.ts +4 -0
  112. package/es/pick.js +14 -0
  113. package/es/replaceCrlf.d.ts +4 -0
  114. package/es/replaceCrlf.js +9 -0
  115. package/es/reserve.d.ts +7 -0
  116. package/es/reserve.js +11 -0
  117. package/es/storage/factory.d.ts +13 -0
  118. package/es/storage/factory.js +65 -0
  119. package/es/storage/index.d.ts +26 -0
  120. package/es/storage/index.js +3 -0
  121. package/lib/base64ToBlob.d.ts +4 -0
  122. package/lib/base64ToBlob.js +93 -0
  123. package/lib/blobToBase64.d.ts +4 -0
  124. package/lib/blobToBase64.js +28 -0
  125. package/lib/compareVersion.d.ts +7 -0
  126. package/lib/compareVersion.js +68 -0
  127. package/lib/compressImage.d.ts +4 -0
  128. package/lib/compressImage.js +27 -0
  129. package/lib/createHexColorByHash.d.ts +4 -0
  130. package/lib/createHexColorByHash.js +84 -0
  131. package/lib/downloadFile.d.ts +6 -0
  132. package/lib/downloadFile.js +32 -0
  133. package/lib/filterBankCardNo.d.ts +4 -0
  134. package/lib/filterBankCardNo.js +21 -0
  135. package/lib/filterEmoji.d.ts +4 -0
  136. package/lib/filterEmoji.js +28 -0
  137. package/lib/filterIdCard.d.ts +4 -0
  138. package/lib/filterIdCard.js +15 -0
  139. package/lib/filterName.d.ts +4 -0
  140. package/lib/filterName.js +31 -0
  141. package/lib/filterPhone.d.ts +6 -0
  142. package/lib/filterPhone.js +18 -0
  143. package/lib/formatAmount.d.ts +4 -0
  144. package/lib/formatAmount.js +42 -0
  145. package/lib/formatDate.d.ts +4 -0
  146. package/lib/formatDate.js +55 -0
  147. package/lib/getBlobByUrl.d.ts +4 -0
  148. package/lib/getBlobByUrl.js +36 -0
  149. package/lib/getImageInfo.d.ts +4 -0
  150. package/lib/getImageInfo.js +26 -0
  151. package/lib/getVideoInfo.d.ts +4 -0
  152. package/lib/getVideoInfo.js +28 -0
  153. package/lib/index.d.ts +38 -0
  154. package/lib/index.js +537 -0
  155. package/lib/isAndroid.d.ts +4 -0
  156. package/lib/isAndroid.js +15 -0
  157. package/lib/isEmail.d.ts +4 -0
  158. package/lib/isEmail.js +15 -0
  159. package/lib/isEmpty.d.ts +4 -0
  160. package/lib/isEmpty.js +17 -0
  161. package/lib/isFunction.d.ts +4 -0
  162. package/lib/isFunction.js +13 -0
  163. package/lib/isIOS.d.ts +4 -0
  164. package/lib/isIOS.js +15 -0
  165. package/lib/isIdCard.d.ts +4 -0
  166. package/lib/isIdCard.js +15 -0
  167. package/lib/isMobile.d.ts +4 -0
  168. package/lib/isMobile.js +20 -0
  169. package/lib/isNull.d.ts +4 -0
  170. package/lib/isNull.js +13 -0
  171. package/lib/isObject.d.ts +4 -0
  172. package/lib/isObject.js +15 -0
  173. package/lib/isPhone.d.ts +4 -0
  174. package/lib/isPhone.js +15 -0
  175. package/lib/isPromise.d.ts +4 -0
  176. package/lib/isPromise.js +17 -0
  177. package/lib/isRegExp.d.ts +4 -0
  178. package/lib/isRegExp.js +19 -0
  179. package/lib/isString.d.ts +4 -0
  180. package/lib/isString.js +13 -0
  181. package/lib/isUndefined.d.ts +4 -0
  182. package/lib/isUndefined.js +13 -0
  183. package/lib/omit.d.ts +4 -0
  184. package/lib/omit.js +26 -0
  185. package/lib/parseError.d.ts +4 -0
  186. package/lib/parseError.js +37 -0
  187. package/lib/parsePath.d.ts +4 -0
  188. package/lib/parsePath.js +23 -0
  189. package/lib/pick.d.ts +4 -0
  190. package/lib/pick.js +22 -0
  191. package/lib/replaceCrlf.d.ts +4 -0
  192. package/lib/replaceCrlf.js +17 -0
  193. package/lib/reserve.d.ts +7 -0
  194. package/lib/reserve.js +18 -0
  195. package/lib/storage/factory.d.ts +13 -0
  196. package/lib/storage/factory.js +75 -0
  197. package/lib/storage/index.d.ts +26 -0
  198. package/lib/storage/index.js +13 -0
  199. package/package.json +94 -0
package/lib/index.d.ts ADDED
@@ -0,0 +1,38 @@
1
+ export declare const version = "0.0.3";
2
+ export * from './base64ToBlob';
3
+ export * from './blobToBase64';
4
+ export * from './compareVersion';
5
+ export * from './compressImage';
6
+ export * from './createHexColorByHash';
7
+ export * from './downloadFile';
8
+ export * from './filterBankCardNo';
9
+ export * from './filterEmoji';
10
+ export * from './filterIdCard';
11
+ export * from './filterName';
12
+ export * from './filterPhone';
13
+ export * from './formatAmount';
14
+ export * from './formatDate';
15
+ export * from './getBlobByUrl';
16
+ export * from './getImageInfo';
17
+ export * from './getVideoInfo';
18
+ export * from './isAndroid';
19
+ export * from './isEmail';
20
+ export * from './isEmpty';
21
+ export * from './isFunction';
22
+ export * from './isIOS';
23
+ export * from './isIdCard';
24
+ export * from './isMobile';
25
+ export * from './isNull';
26
+ export * from './isObject';
27
+ export * from './isPhone';
28
+ export * from './isPromise';
29
+ export * from './isRegExp';
30
+ export * from './isString';
31
+ export * from './isUndefined';
32
+ export * from './omit';
33
+ export * from './parseError';
34
+ export * from './parsePath';
35
+ export * from './pick';
36
+ export * from './replaceCrlf';
37
+ export * from './reserve';
38
+ export * from './storage';
package/lib/index.js ADDED
@@ -0,0 +1,537 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.to-string.js");
4
+
5
+ require("core-js/modules/web.dom-collections.for-each.js");
6
+
7
+ require("core-js/modules/es.object.keys.js");
8
+
9
+ Object.defineProperty(exports, "__esModule", {
10
+ value: true
11
+ });
12
+ var _exportNames = {
13
+ version: true
14
+ };
15
+ exports.version = void 0;
16
+
17
+ var _base64ToBlob = require("./base64ToBlob");
18
+
19
+ Object.keys(_base64ToBlob).forEach(function (key) {
20
+ if (key === "default" || key === "__esModule") return;
21
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
22
+ if (key in exports && exports[key] === _base64ToBlob[key]) return;
23
+ Object.defineProperty(exports, key, {
24
+ enumerable: true,
25
+ get: function get() {
26
+ return _base64ToBlob[key];
27
+ }
28
+ });
29
+ });
30
+
31
+ var _blobToBase = require("./blobToBase64");
32
+
33
+ Object.keys(_blobToBase).forEach(function (key) {
34
+ if (key === "default" || key === "__esModule") return;
35
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
36
+ if (key in exports && exports[key] === _blobToBase[key]) return;
37
+ Object.defineProperty(exports, key, {
38
+ enumerable: true,
39
+ get: function get() {
40
+ return _blobToBase[key];
41
+ }
42
+ });
43
+ });
44
+
45
+ var _compareVersion = require("./compareVersion");
46
+
47
+ Object.keys(_compareVersion).forEach(function (key) {
48
+ if (key === "default" || key === "__esModule") return;
49
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
50
+ if (key in exports && exports[key] === _compareVersion[key]) return;
51
+ Object.defineProperty(exports, key, {
52
+ enumerable: true,
53
+ get: function get() {
54
+ return _compareVersion[key];
55
+ }
56
+ });
57
+ });
58
+
59
+ var _compressImage = require("./compressImage");
60
+
61
+ Object.keys(_compressImage).forEach(function (key) {
62
+ if (key === "default" || key === "__esModule") return;
63
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
64
+ if (key in exports && exports[key] === _compressImage[key]) return;
65
+ Object.defineProperty(exports, key, {
66
+ enumerable: true,
67
+ get: function get() {
68
+ return _compressImage[key];
69
+ }
70
+ });
71
+ });
72
+
73
+ var _createHexColorByHash = require("./createHexColorByHash");
74
+
75
+ Object.keys(_createHexColorByHash).forEach(function (key) {
76
+ if (key === "default" || key === "__esModule") return;
77
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
78
+ if (key in exports && exports[key] === _createHexColorByHash[key]) return;
79
+ Object.defineProperty(exports, key, {
80
+ enumerable: true,
81
+ get: function get() {
82
+ return _createHexColorByHash[key];
83
+ }
84
+ });
85
+ });
86
+
87
+ var _downloadFile = require("./downloadFile");
88
+
89
+ Object.keys(_downloadFile).forEach(function (key) {
90
+ if (key === "default" || key === "__esModule") return;
91
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
92
+ if (key in exports && exports[key] === _downloadFile[key]) return;
93
+ Object.defineProperty(exports, key, {
94
+ enumerable: true,
95
+ get: function get() {
96
+ return _downloadFile[key];
97
+ }
98
+ });
99
+ });
100
+
101
+ var _filterBankCardNo = require("./filterBankCardNo");
102
+
103
+ Object.keys(_filterBankCardNo).forEach(function (key) {
104
+ if (key === "default" || key === "__esModule") return;
105
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
106
+ if (key in exports && exports[key] === _filterBankCardNo[key]) return;
107
+ Object.defineProperty(exports, key, {
108
+ enumerable: true,
109
+ get: function get() {
110
+ return _filterBankCardNo[key];
111
+ }
112
+ });
113
+ });
114
+
115
+ var _filterEmoji = require("./filterEmoji");
116
+
117
+ Object.keys(_filterEmoji).forEach(function (key) {
118
+ if (key === "default" || key === "__esModule") return;
119
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
120
+ if (key in exports && exports[key] === _filterEmoji[key]) return;
121
+ Object.defineProperty(exports, key, {
122
+ enumerable: true,
123
+ get: function get() {
124
+ return _filterEmoji[key];
125
+ }
126
+ });
127
+ });
128
+
129
+ var _filterIdCard = require("./filterIdCard");
130
+
131
+ Object.keys(_filterIdCard).forEach(function (key) {
132
+ if (key === "default" || key === "__esModule") return;
133
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
134
+ if (key in exports && exports[key] === _filterIdCard[key]) return;
135
+ Object.defineProperty(exports, key, {
136
+ enumerable: true,
137
+ get: function get() {
138
+ return _filterIdCard[key];
139
+ }
140
+ });
141
+ });
142
+
143
+ var _filterName = require("./filterName");
144
+
145
+ Object.keys(_filterName).forEach(function (key) {
146
+ if (key === "default" || key === "__esModule") return;
147
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
148
+ if (key in exports && exports[key] === _filterName[key]) return;
149
+ Object.defineProperty(exports, key, {
150
+ enumerable: true,
151
+ get: function get() {
152
+ return _filterName[key];
153
+ }
154
+ });
155
+ });
156
+
157
+ var _filterPhone = require("./filterPhone");
158
+
159
+ Object.keys(_filterPhone).forEach(function (key) {
160
+ if (key === "default" || key === "__esModule") return;
161
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
162
+ if (key in exports && exports[key] === _filterPhone[key]) return;
163
+ Object.defineProperty(exports, key, {
164
+ enumerable: true,
165
+ get: function get() {
166
+ return _filterPhone[key];
167
+ }
168
+ });
169
+ });
170
+
171
+ var _formatAmount = require("./formatAmount");
172
+
173
+ Object.keys(_formatAmount).forEach(function (key) {
174
+ if (key === "default" || key === "__esModule") return;
175
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
176
+ if (key in exports && exports[key] === _formatAmount[key]) return;
177
+ Object.defineProperty(exports, key, {
178
+ enumerable: true,
179
+ get: function get() {
180
+ return _formatAmount[key];
181
+ }
182
+ });
183
+ });
184
+
185
+ var _formatDate = require("./formatDate");
186
+
187
+ Object.keys(_formatDate).forEach(function (key) {
188
+ if (key === "default" || key === "__esModule") return;
189
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
190
+ if (key in exports && exports[key] === _formatDate[key]) return;
191
+ Object.defineProperty(exports, key, {
192
+ enumerable: true,
193
+ get: function get() {
194
+ return _formatDate[key];
195
+ }
196
+ });
197
+ });
198
+
199
+ var _getBlobByUrl = require("./getBlobByUrl");
200
+
201
+ Object.keys(_getBlobByUrl).forEach(function (key) {
202
+ if (key === "default" || key === "__esModule") return;
203
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
204
+ if (key in exports && exports[key] === _getBlobByUrl[key]) return;
205
+ Object.defineProperty(exports, key, {
206
+ enumerable: true,
207
+ get: function get() {
208
+ return _getBlobByUrl[key];
209
+ }
210
+ });
211
+ });
212
+
213
+ var _getImageInfo = require("./getImageInfo");
214
+
215
+ Object.keys(_getImageInfo).forEach(function (key) {
216
+ if (key === "default" || key === "__esModule") return;
217
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
218
+ if (key in exports && exports[key] === _getImageInfo[key]) return;
219
+ Object.defineProperty(exports, key, {
220
+ enumerable: true,
221
+ get: function get() {
222
+ return _getImageInfo[key];
223
+ }
224
+ });
225
+ });
226
+
227
+ var _getVideoInfo = require("./getVideoInfo");
228
+
229
+ Object.keys(_getVideoInfo).forEach(function (key) {
230
+ if (key === "default" || key === "__esModule") return;
231
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
232
+ if (key in exports && exports[key] === _getVideoInfo[key]) return;
233
+ Object.defineProperty(exports, key, {
234
+ enumerable: true,
235
+ get: function get() {
236
+ return _getVideoInfo[key];
237
+ }
238
+ });
239
+ });
240
+
241
+ var _isAndroid = require("./isAndroid");
242
+
243
+ Object.keys(_isAndroid).forEach(function (key) {
244
+ if (key === "default" || key === "__esModule") return;
245
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
246
+ if (key in exports && exports[key] === _isAndroid[key]) return;
247
+ Object.defineProperty(exports, key, {
248
+ enumerable: true,
249
+ get: function get() {
250
+ return _isAndroid[key];
251
+ }
252
+ });
253
+ });
254
+
255
+ var _isEmail = require("./isEmail");
256
+
257
+ Object.keys(_isEmail).forEach(function (key) {
258
+ if (key === "default" || key === "__esModule") return;
259
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
260
+ if (key in exports && exports[key] === _isEmail[key]) return;
261
+ Object.defineProperty(exports, key, {
262
+ enumerable: true,
263
+ get: function get() {
264
+ return _isEmail[key];
265
+ }
266
+ });
267
+ });
268
+
269
+ var _isEmpty = require("./isEmpty");
270
+
271
+ Object.keys(_isEmpty).forEach(function (key) {
272
+ if (key === "default" || key === "__esModule") return;
273
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
274
+ if (key in exports && exports[key] === _isEmpty[key]) return;
275
+ Object.defineProperty(exports, key, {
276
+ enumerable: true,
277
+ get: function get() {
278
+ return _isEmpty[key];
279
+ }
280
+ });
281
+ });
282
+
283
+ var _isFunction = require("./isFunction");
284
+
285
+ Object.keys(_isFunction).forEach(function (key) {
286
+ if (key === "default" || key === "__esModule") return;
287
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
288
+ if (key in exports && exports[key] === _isFunction[key]) return;
289
+ Object.defineProperty(exports, key, {
290
+ enumerable: true,
291
+ get: function get() {
292
+ return _isFunction[key];
293
+ }
294
+ });
295
+ });
296
+
297
+ var _isIOS = require("./isIOS");
298
+
299
+ Object.keys(_isIOS).forEach(function (key) {
300
+ if (key === "default" || key === "__esModule") return;
301
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
302
+ if (key in exports && exports[key] === _isIOS[key]) return;
303
+ Object.defineProperty(exports, key, {
304
+ enumerable: true,
305
+ get: function get() {
306
+ return _isIOS[key];
307
+ }
308
+ });
309
+ });
310
+
311
+ var _isIdCard = require("./isIdCard");
312
+
313
+ Object.keys(_isIdCard).forEach(function (key) {
314
+ if (key === "default" || key === "__esModule") return;
315
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
316
+ if (key in exports && exports[key] === _isIdCard[key]) return;
317
+ Object.defineProperty(exports, key, {
318
+ enumerable: true,
319
+ get: function get() {
320
+ return _isIdCard[key];
321
+ }
322
+ });
323
+ });
324
+
325
+ var _isMobile = require("./isMobile");
326
+
327
+ Object.keys(_isMobile).forEach(function (key) {
328
+ if (key === "default" || key === "__esModule") return;
329
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
330
+ if (key in exports && exports[key] === _isMobile[key]) return;
331
+ Object.defineProperty(exports, key, {
332
+ enumerable: true,
333
+ get: function get() {
334
+ return _isMobile[key];
335
+ }
336
+ });
337
+ });
338
+
339
+ var _isNull = require("./isNull");
340
+
341
+ Object.keys(_isNull).forEach(function (key) {
342
+ if (key === "default" || key === "__esModule") return;
343
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
344
+ if (key in exports && exports[key] === _isNull[key]) return;
345
+ Object.defineProperty(exports, key, {
346
+ enumerable: true,
347
+ get: function get() {
348
+ return _isNull[key];
349
+ }
350
+ });
351
+ });
352
+
353
+ var _isObject = require("./isObject");
354
+
355
+ Object.keys(_isObject).forEach(function (key) {
356
+ if (key === "default" || key === "__esModule") return;
357
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
358
+ if (key in exports && exports[key] === _isObject[key]) return;
359
+ Object.defineProperty(exports, key, {
360
+ enumerable: true,
361
+ get: function get() {
362
+ return _isObject[key];
363
+ }
364
+ });
365
+ });
366
+
367
+ var _isPhone = require("./isPhone");
368
+
369
+ Object.keys(_isPhone).forEach(function (key) {
370
+ if (key === "default" || key === "__esModule") return;
371
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
372
+ if (key in exports && exports[key] === _isPhone[key]) return;
373
+ Object.defineProperty(exports, key, {
374
+ enumerable: true,
375
+ get: function get() {
376
+ return _isPhone[key];
377
+ }
378
+ });
379
+ });
380
+
381
+ var _isPromise = require("./isPromise");
382
+
383
+ Object.keys(_isPromise).forEach(function (key) {
384
+ if (key === "default" || key === "__esModule") return;
385
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
386
+ if (key in exports && exports[key] === _isPromise[key]) return;
387
+ Object.defineProperty(exports, key, {
388
+ enumerable: true,
389
+ get: function get() {
390
+ return _isPromise[key];
391
+ }
392
+ });
393
+ });
394
+
395
+ var _isRegExp = require("./isRegExp");
396
+
397
+ Object.keys(_isRegExp).forEach(function (key) {
398
+ if (key === "default" || key === "__esModule") return;
399
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
400
+ if (key in exports && exports[key] === _isRegExp[key]) return;
401
+ Object.defineProperty(exports, key, {
402
+ enumerable: true,
403
+ get: function get() {
404
+ return _isRegExp[key];
405
+ }
406
+ });
407
+ });
408
+
409
+ var _isString = require("./isString");
410
+
411
+ Object.keys(_isString).forEach(function (key) {
412
+ if (key === "default" || key === "__esModule") return;
413
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
414
+ if (key in exports && exports[key] === _isString[key]) return;
415
+ Object.defineProperty(exports, key, {
416
+ enumerable: true,
417
+ get: function get() {
418
+ return _isString[key];
419
+ }
420
+ });
421
+ });
422
+
423
+ var _isUndefined = require("./isUndefined");
424
+
425
+ Object.keys(_isUndefined).forEach(function (key) {
426
+ if (key === "default" || key === "__esModule") return;
427
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
428
+ if (key in exports && exports[key] === _isUndefined[key]) return;
429
+ Object.defineProperty(exports, key, {
430
+ enumerable: true,
431
+ get: function get() {
432
+ return _isUndefined[key];
433
+ }
434
+ });
435
+ });
436
+
437
+ var _omit = require("./omit");
438
+
439
+ Object.keys(_omit).forEach(function (key) {
440
+ if (key === "default" || key === "__esModule") return;
441
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
442
+ if (key in exports && exports[key] === _omit[key]) return;
443
+ Object.defineProperty(exports, key, {
444
+ enumerable: true,
445
+ get: function get() {
446
+ return _omit[key];
447
+ }
448
+ });
449
+ });
450
+
451
+ var _parseError = require("./parseError");
452
+
453
+ Object.keys(_parseError).forEach(function (key) {
454
+ if (key === "default" || key === "__esModule") return;
455
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
456
+ if (key in exports && exports[key] === _parseError[key]) return;
457
+ Object.defineProperty(exports, key, {
458
+ enumerable: true,
459
+ get: function get() {
460
+ return _parseError[key];
461
+ }
462
+ });
463
+ });
464
+
465
+ var _parsePath = require("./parsePath");
466
+
467
+ Object.keys(_parsePath).forEach(function (key) {
468
+ if (key === "default" || key === "__esModule") return;
469
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
470
+ if (key in exports && exports[key] === _parsePath[key]) return;
471
+ Object.defineProperty(exports, key, {
472
+ enumerable: true,
473
+ get: function get() {
474
+ return _parsePath[key];
475
+ }
476
+ });
477
+ });
478
+
479
+ var _pick = require("./pick");
480
+
481
+ Object.keys(_pick).forEach(function (key) {
482
+ if (key === "default" || key === "__esModule") return;
483
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
484
+ if (key in exports && exports[key] === _pick[key]) return;
485
+ Object.defineProperty(exports, key, {
486
+ enumerable: true,
487
+ get: function get() {
488
+ return _pick[key];
489
+ }
490
+ });
491
+ });
492
+
493
+ var _replaceCrlf = require("./replaceCrlf");
494
+
495
+ Object.keys(_replaceCrlf).forEach(function (key) {
496
+ if (key === "default" || key === "__esModule") return;
497
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
498
+ if (key in exports && exports[key] === _replaceCrlf[key]) return;
499
+ Object.defineProperty(exports, key, {
500
+ enumerable: true,
501
+ get: function get() {
502
+ return _replaceCrlf[key];
503
+ }
504
+ });
505
+ });
506
+
507
+ var _reserve = require("./reserve");
508
+
509
+ Object.keys(_reserve).forEach(function (key) {
510
+ if (key === "default" || key === "__esModule") return;
511
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
512
+ if (key in exports && exports[key] === _reserve[key]) return;
513
+ Object.defineProperty(exports, key, {
514
+ enumerable: true,
515
+ get: function get() {
516
+ return _reserve[key];
517
+ }
518
+ });
519
+ });
520
+
521
+ var _storage = require("./storage");
522
+
523
+ Object.keys(_storage).forEach(function (key) {
524
+ if (key === "default" || key === "__esModule") return;
525
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
526
+ if (key in exports && exports[key] === _storage[key]) return;
527
+ Object.defineProperty(exports, key, {
528
+ enumerable: true,
529
+ get: function get() {
530
+ return _storage[key];
531
+ }
532
+ });
533
+ });
534
+
535
+ /* 本文件自动生成 './scripts/entry.js' */
536
+ var version = '0.0.3';
537
+ exports.version = version;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 校验是否是安卓
3
+ */
4
+ export declare function isAndroid(): boolean;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isAndroid = isAndroid;
7
+
8
+ require("core-js/modules/es.regexp.exec.js");
9
+
10
+ /**
11
+ * 校验是否是安卓
12
+ */
13
+ function isAndroid() {
14
+ return /android/.test(navigator.userAgent.toLowerCase());
15
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 校验是否是邮箱
3
+ */
4
+ export declare function isEmail(val: string): boolean;
package/lib/isEmail.js ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isEmail = isEmail;
7
+
8
+ require("core-js/modules/es.regexp.exec.js");
9
+
10
+ /**
11
+ * 校验是否是邮箱
12
+ */
13
+ function isEmail(val) {
14
+ return /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(val);
15
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 校验是否为空 ''、undefined、null
3
+ */
4
+ export declare function isEmpty(val: unknown): boolean;
package/lib/isEmpty.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isEmpty = isEmpty;
7
+
8
+ var _isNull = require("./isNull");
9
+
10
+ var _isUndefined = require("./isUndefined");
11
+
12
+ /**
13
+ * 校验是否为空 ''、undefined、null
14
+ */
15
+ function isEmpty(val) {
16
+ return val === '' || (0, _isNull.isNull)(val) || (0, _isUndefined.isUndefined)(val);
17
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 校验是否是函数
3
+ */
4
+ export declare function isFunction(val: unknown): val is (...args: any[]) => any;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isFunction = isFunction;
7
+
8
+ /**
9
+ * 校验是否是函数
10
+ */
11
+ function isFunction(val) {
12
+ return typeof val === 'function';
13
+ }
package/lib/isIOS.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 校验是否是ios
3
+ */
4
+ export declare function isIOS(): boolean;
package/lib/isIOS.js ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isIOS = isIOS;
7
+
8
+ require("core-js/modules/es.regexp.exec.js");
9
+
10
+ /**
11
+ * 校验是否是ios
12
+ */
13
+ function isIOS() {
14
+ return /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());
15
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 校验是否是身份证
3
+ */
4
+ export declare function isIdCard(val: string): boolean;