@daysnap/utils 0.0.31 → 0.0.32

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/docs/modules.md CHANGED
@@ -67,10 +67,10 @@ base64 转 blob
67
67
 
68
68
  #### Parameters
69
69
 
70
- | Name | Type |
71
- | :------ | :------ |
72
- | `base64` | `string` |
73
- | `contentType?` | `string` |
70
+ | Name | Type | Description |
71
+ | :------ | :------ | :------ |
72
+ | `base64` | `string` | base64字符串 |
73
+ | `contentType?` | `string` | 文件类型 |
74
74
 
75
75
  #### Returns
76
76
 
@@ -78,7 +78,7 @@ base64 转 blob
78
78
 
79
79
  #### Defined in
80
80
 
81
- [base64ToBlob.ts:4](https://github.com/daysnap/utils/blob/d990909/src/base64ToBlob.ts#L4)
81
+ [base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/455869f/src/base64ToBlob.ts#L6)
82
82
 
83
83
  ___
84
84
 
@@ -100,7 +100,7 @@ blob 转 base64
100
100
 
101
101
  #### Defined in
102
102
 
103
- [blobToBase64.ts:4](https://github.com/daysnap/utils/blob/d990909/src/blobToBase64.ts#L4)
103
+ [blobToBase64.ts:4](https://github.com/daysnap/utils/blob/455869f/src/blobToBase64.ts#L4)
104
104
 
105
105
  ___
106
106
 
@@ -122,7 +122,7 @@ ___
122
122
 
123
123
  #### Defined in
124
124
 
125
- [createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/d990909/src/createHexColorByHash.ts#L4)
125
+ [createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/455869f/src/createHexColorByHash.ts#L4)
126
126
 
127
127
  ___
128
128
 
@@ -148,7 +148,7 @@ ___
148
148
 
149
149
  #### Defined in
150
150
 
151
- [compareVersion.ts:9](https://github.com/daysnap/utils/blob/d990909/src/compareVersion.ts#L9)
151
+ [compareVersion.ts:9](https://github.com/daysnap/utils/blob/455869f/src/compareVersion.ts#L9)
152
152
 
153
153
  ___
154
154
 
@@ -170,7 +170,7 @@ ___
170
170
 
171
171
  #### Defined in
172
172
 
173
- [compressImage.ts:6](https://github.com/daysnap/utils/blob/d990909/src/compressImage.ts#L6)
173
+ [compressImage.ts:6](https://github.com/daysnap/utils/blob/455869f/src/compressImage.ts#L6)
174
174
 
175
175
  ___
176
176
 
@@ -194,7 +194,7 @@ ___
194
194
 
195
195
  #### Defined in
196
196
 
197
- [downloadFile.ts:4](https://github.com/daysnap/utils/blob/d990909/src/downloadFile.ts#L4)
197
+ [downloadFile.ts:4](https://github.com/daysnap/utils/blob/455869f/src/downloadFile.ts#L4)
198
198
 
199
199
  ___
200
200
 
@@ -223,7 +223,7 @@ ___
223
223
 
224
224
  #### Defined in
225
225
 
226
- [each.ts:4](https://github.com/daysnap/utils/blob/d990909/src/each.ts#L4)
226
+ [each.ts:4](https://github.com/daysnap/utils/blob/455869f/src/each.ts#L4)
227
227
 
228
228
  ▸ **each**<`T`\>(`data`, `callback`): `void`
229
229
 
@@ -246,7 +246,7 @@ ___
246
246
 
247
247
  #### Defined in
248
248
 
249
- [each.ts:8](https://github.com/daysnap/utils/blob/d990909/src/each.ts#L8)
249
+ [each.ts:8](https://github.com/daysnap/utils/blob/455869f/src/each.ts#L8)
250
250
 
251
251
  ___
252
252
 
@@ -268,7 +268,7 @@ ___
268
268
 
269
269
  #### Defined in
270
270
 
271
- [filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/d990909/src/filterBankCardNo.ts#L4)
271
+ [filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/455869f/src/filterBankCardNo.ts#L4)
272
272
 
273
273
  ___
274
274
 
@@ -290,7 +290,7 @@ ___
290
290
 
291
291
  #### Defined in
292
292
 
293
- [filterEmoji.ts:4](https://github.com/daysnap/utils/blob/d990909/src/filterEmoji.ts#L4)
293
+ [filterEmoji.ts:4](https://github.com/daysnap/utils/blob/455869f/src/filterEmoji.ts#L4)
294
294
 
295
295
  ___
296
296
 
@@ -312,7 +312,7 @@ ___
312
312
 
313
313
  #### Defined in
314
314
 
315
- [filterIdCard.ts:4](https://github.com/daysnap/utils/blob/d990909/src/filterIdCard.ts#L4)
315
+ [filterIdCard.ts:4](https://github.com/daysnap/utils/blob/455869f/src/filterIdCard.ts#L4)
316
316
 
317
317
  ___
318
318
 
@@ -334,7 +334,7 @@ ___
334
334
 
335
335
  #### Defined in
336
336
 
337
- [filterName.ts:4](https://github.com/daysnap/utils/blob/d990909/src/filterName.ts#L4)
337
+ [filterName.ts:4](https://github.com/daysnap/utils/blob/455869f/src/filterName.ts#L4)
338
338
 
339
339
  ___
340
340
 
@@ -359,7 +359,7 @@ filterPhone('13177778888', ' ') => 131 **** 8888
359
359
 
360
360
  #### Defined in
361
361
 
362
- [filterPhone.ts:6](https://github.com/daysnap/utils/blob/d990909/src/filterPhone.ts#L6)
362
+ [filterPhone.ts:6](https://github.com/daysnap/utils/blob/455869f/src/filterPhone.ts#L6)
363
363
 
364
364
  ___
365
365
 
@@ -382,7 +382,7 @@ ___
382
382
 
383
383
  #### Defined in
384
384
 
385
- [formatAmount.ts:4](https://github.com/daysnap/utils/blob/d990909/src/formatAmount.ts#L4)
385
+ [formatAmount.ts:4](https://github.com/daysnap/utils/blob/455869f/src/formatAmount.ts#L4)
386
386
 
387
387
  ___
388
388
 
@@ -405,7 +405,7 @@ ___
405
405
 
406
406
  #### Defined in
407
407
 
408
- [formatDate.ts:6](https://github.com/daysnap/utils/blob/d990909/src/formatDate.ts#L6)
408
+ [formatDate.ts:6](https://github.com/daysnap/utils/blob/455869f/src/formatDate.ts#L6)
409
409
 
410
410
  ___
411
411
 
@@ -427,7 +427,7 @@ ___
427
427
 
428
428
  #### Defined in
429
429
 
430
- [getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/d990909/src/getBlobByUrl.ts#L4)
430
+ [getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/455869f/src/getBlobByUrl.ts#L4)
431
431
 
432
432
  ___
433
433
 
@@ -450,7 +450,7 @@ ___
450
450
 
451
451
  #### Defined in
452
452
 
453
- [storage/index.ts:7](https://github.com/daysnap/utils/blob/d990909/src/storage/index.ts#L7)
453
+ [storage/index.ts:7](https://github.com/daysnap/utils/blob/455869f/src/storage/index.ts#L7)
454
454
 
455
455
  ___
456
456
 
@@ -472,7 +472,7 @@ ___
472
472
 
473
473
  #### Defined in
474
474
 
475
- [getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/d990909/src/getDayMillisecond.ts#L4)
475
+ [getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/455869f/src/getDayMillisecond.ts#L4)
476
476
 
477
477
  ___
478
478
 
@@ -494,7 +494,7 @@ ___
494
494
 
495
495
  #### Defined in
496
496
 
497
- [getImageInfo.ts:4](https://github.com/daysnap/utils/blob/d990909/src/getImageInfo.ts#L4)
497
+ [getImageInfo.ts:4](https://github.com/daysnap/utils/blob/455869f/src/getImageInfo.ts#L4)
498
498
 
499
499
  ___
500
500
 
@@ -517,7 +517,7 @@ ___
517
517
 
518
518
  #### Defined in
519
519
 
520
- [storage/index.ts:7](https://github.com/daysnap/utils/blob/d990909/src/storage/index.ts#L7)
520
+ [storage/index.ts:7](https://github.com/daysnap/utils/blob/455869f/src/storage/index.ts#L7)
521
521
 
522
522
  ___
523
523
 
@@ -539,7 +539,7 @@ ___
539
539
 
540
540
  #### Defined in
541
541
 
542
- [getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/d990909/src/getVideoInfo.ts#L4)
542
+ [getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/455869f/src/getVideoInfo.ts#L4)
543
543
 
544
544
  ___
545
545
 
@@ -555,7 +555,7 @@ ___
555
555
 
556
556
  #### Defined in
557
557
 
558
- [inBrowser.ts:4](https://github.com/daysnap/utils/blob/d990909/src/inBrowser.ts#L4)
558
+ [inBrowser.ts:4](https://github.com/daysnap/utils/blob/455869f/src/inBrowser.ts#L4)
559
559
 
560
560
  ___
561
561
 
@@ -571,7 +571,7 @@ ___
571
571
 
572
572
  #### Defined in
573
573
 
574
- [isAndroid.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isAndroid.ts#L4)
574
+ [isAndroid.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isAndroid.ts#L4)
575
575
 
576
576
  ___
577
577
 
@@ -593,7 +593,7 @@ ___
593
593
 
594
594
  #### Defined in
595
595
 
596
- [isEmail.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isEmail.ts#L4)
596
+ [isEmail.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isEmail.ts#L4)
597
597
 
598
598
  ___
599
599
 
@@ -615,7 +615,7 @@ ___
615
615
 
616
616
  #### Defined in
617
617
 
618
- [isEmpty.ts:6](https://github.com/daysnap/utils/blob/d990909/src/isEmpty.ts#L6)
618
+ [isEmpty.ts:6](https://github.com/daysnap/utils/blob/455869f/src/isEmpty.ts#L6)
619
619
 
620
620
  ___
621
621
 
@@ -637,7 +637,7 @@ ___
637
637
 
638
638
  #### Defined in
639
639
 
640
- [isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/d990909/src/isEmptyObject.ts#L5)
640
+ [isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/455869f/src/isEmptyObject.ts#L5)
641
641
 
642
642
  ___
643
643
 
@@ -659,7 +659,7 @@ val is Error
659
659
 
660
660
  #### Defined in
661
661
 
662
- [isError.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isError.ts#L4)
662
+ [isError.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isError.ts#L4)
663
663
 
664
664
  ___
665
665
 
@@ -681,7 +681,7 @@ val is Function
681
681
 
682
682
  #### Defined in
683
683
 
684
- [isFunction.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isFunction.ts#L4)
684
+ [isFunction.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isFunction.ts#L4)
685
685
 
686
686
  ___
687
687
 
@@ -697,7 +697,7 @@ ___
697
697
 
698
698
  #### Defined in
699
699
 
700
- [isIOS.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isIOS.ts#L4)
700
+ [isIOS.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isIOS.ts#L4)
701
701
 
702
702
  ___
703
703
 
@@ -719,7 +719,7 @@ ___
719
719
 
720
720
  #### Defined in
721
721
 
722
- [isIdCard.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isIdCard.ts#L4)
722
+ [isIdCard.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isIdCard.ts#L4)
723
723
 
724
724
  ___
725
725
 
@@ -741,7 +741,7 @@ ___
741
741
 
742
742
  #### Defined in
743
743
 
744
- [isJSONString.ts:7](https://github.com/daysnap/utils/blob/d990909/src/isJSONString.ts#L7)
744
+ [isJSONString.ts:7](https://github.com/daysnap/utils/blob/455869f/src/isJSONString.ts#L7)
745
745
 
746
746
  ___
747
747
 
@@ -763,7 +763,7 @@ ___
763
763
 
764
764
  #### Defined in
765
765
 
766
- [isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/d990909/src/isLicenseCode.ts#L5)
766
+ [isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/455869f/src/isLicenseCode.ts#L5)
767
767
 
768
768
  ___
769
769
 
@@ -779,7 +779,7 @@ ___
779
779
 
780
780
  #### Defined in
781
781
 
782
- [isMobile.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isMobile.ts#L4)
782
+ [isMobile.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isMobile.ts#L4)
783
783
 
784
784
  ___
785
785
 
@@ -801,7 +801,7 @@ val is null
801
801
 
802
802
  #### Defined in
803
803
 
804
- [isNull.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isNull.ts#L4)
804
+ [isNull.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isNull.ts#L4)
805
805
 
806
806
  ___
807
807
 
@@ -823,7 +823,7 @@ val is Record<string, any\>
823
823
 
824
824
  #### Defined in
825
825
 
826
- [isObject.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isObject.ts#L4)
826
+ [isObject.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isObject.ts#L4)
827
827
 
828
828
  ___
829
829
 
@@ -845,7 +845,7 @@ ___
845
845
 
846
846
  #### Defined in
847
847
 
848
- [isPhone.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isPhone.ts#L4)
848
+ [isPhone.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isPhone.ts#L4)
849
849
 
850
850
  ___
851
851
 
@@ -873,7 +873,7 @@ val is Promise<T\>
873
873
 
874
874
  #### Defined in
875
875
 
876
- [isPromise.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isPromise.ts#L4)
876
+ [isPromise.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isPromise.ts#L4)
877
877
 
878
878
  ___
879
879
 
@@ -895,7 +895,7 @@ val is RegExp
895
895
 
896
896
  #### Defined in
897
897
 
898
- [isRegExp.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isRegExp.ts#L4)
898
+ [isRegExp.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isRegExp.ts#L4)
899
899
 
900
900
  ___
901
901
 
@@ -917,7 +917,7 @@ val is string
917
917
 
918
918
  #### Defined in
919
919
 
920
- [isString.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isString.ts#L4)
920
+ [isString.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isString.ts#L4)
921
921
 
922
922
  ___
923
923
 
@@ -939,7 +939,7 @@ val is undefined
939
939
 
940
940
  #### Defined in
941
941
 
942
- [isUndefined.ts:4](https://github.com/daysnap/utils/blob/d990909/src/isUndefined.ts#L4)
942
+ [isUndefined.ts:4](https://github.com/daysnap/utils/blob/455869f/src/isUndefined.ts#L4)
943
943
 
944
944
  ___
945
945
 
@@ -961,7 +961,7 @@ val is Window
961
961
 
962
962
  #### Defined in
963
963
 
964
- [isWindow.ts:5](https://github.com/daysnap/utils/blob/d990909/src/isWindow.ts#L5)
964
+ [isWindow.ts:5](https://github.com/daysnap/utils/blob/455869f/src/isWindow.ts#L5)
965
965
 
966
966
  ___
967
967
 
@@ -991,7 +991,7 @@ ___
991
991
 
992
992
  #### Defined in
993
993
 
994
- [omit.ts:4](https://github.com/daysnap/utils/blob/d990909/src/omit.ts#L4)
994
+ [omit.ts:4](https://github.com/daysnap/utils/blob/455869f/src/omit.ts#L4)
995
995
 
996
996
  ___
997
997
 
@@ -1013,7 +1013,7 @@ ___
1013
1013
 
1014
1014
  #### Defined in
1015
1015
 
1016
- [parseDate.ts:4](https://github.com/daysnap/utils/blob/d990909/src/parseDate.ts#L4)
1016
+ [parseDate.ts:4](https://github.com/daysnap/utils/blob/455869f/src/parseDate.ts#L4)
1017
1017
 
1018
1018
  ___
1019
1019
 
@@ -1036,7 +1036,7 @@ ___
1036
1036
 
1037
1037
  #### Defined in
1038
1038
 
1039
- [parseError.ts:8](https://github.com/daysnap/utils/blob/d990909/src/parseError.ts#L8)
1039
+ [parseError.ts:8](https://github.com/daysnap/utils/blob/455869f/src/parseError.ts#L8)
1040
1040
 
1041
1041
  ___
1042
1042
 
@@ -1059,7 +1059,7 @@ ___
1059
1059
 
1060
1060
  #### Defined in
1061
1061
 
1062
- [parsePath.ts:4](https://github.com/daysnap/utils/blob/d990909/src/parsePath.ts#L4)
1062
+ [parsePath.ts:4](https://github.com/daysnap/utils/blob/455869f/src/parsePath.ts#L4)
1063
1063
 
1064
1064
  ___
1065
1065
 
@@ -1082,7 +1082,7 @@ ___
1082
1082
 
1083
1083
  #### Defined in
1084
1084
 
1085
- [parseQuery.ts:8](https://github.com/daysnap/utils/blob/d990909/src/parseQuery.ts#L8)
1085
+ [parseQuery.ts:8](https://github.com/daysnap/utils/blob/455869f/src/parseQuery.ts#L8)
1086
1086
 
1087
1087
  ___
1088
1088
 
@@ -1112,7 +1112,7 @@ ___
1112
1112
 
1113
1113
  #### Defined in
1114
1114
 
1115
- [pick.ts:4](https://github.com/daysnap/utils/blob/d990909/src/pick.ts#L4)
1115
+ [pick.ts:4](https://github.com/daysnap/utils/blob/455869f/src/pick.ts#L4)
1116
1116
 
1117
1117
  ___
1118
1118
 
@@ -1135,7 +1135,7 @@ ___
1135
1135
 
1136
1136
  #### Defined in
1137
1137
 
1138
- [replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/d990909/src/replaceCrlf.ts#L4)
1138
+ [replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/455869f/src/replaceCrlf.ts#L4)
1139
1139
 
1140
1140
  ___
1141
1141
 
@@ -1161,7 +1161,7 @@ reserve(0, '--') => 0
1161
1161
 
1162
1162
  #### Defined in
1163
1163
 
1164
- [reserve.ts:8](https://github.com/daysnap/utils/blob/d990909/src/reserve.ts#L8)
1164
+ [reserve.ts:8](https://github.com/daysnap/utils/blob/455869f/src/reserve.ts#L8)
1165
1165
 
1166
1166
  ___
1167
1167
 
@@ -1184,7 +1184,7 @@ ___
1184
1184
 
1185
1185
  #### Defined in
1186
1186
 
1187
- [sleep.ts:4](https://github.com/daysnap/utils/blob/d990909/src/sleep.ts#L4)
1187
+ [sleep.ts:4](https://github.com/daysnap/utils/blob/455869f/src/sleep.ts#L4)
1188
1188
 
1189
1189
  ___
1190
1190
 
@@ -1206,4 +1206,4 @@ ___
1206
1206
 
1207
1207
  #### Defined in
1208
1208
 
1209
- [stringifyQuery.ts:6](https://github.com/daysnap/utils/blob/d990909/src/stringifyQuery.ts#L6)
1209
+ [stringifyQuery.ts:6](https://github.com/daysnap/utils/blob/455869f/src/stringifyQuery.ts#L6)
@@ -1,4 +1,6 @@
1
1
  /**
2
2
  * base64 转 blob
3
+ * @param base64 base64字符串
4
+ * @param contentType 文件类型
3
5
  */
4
6
  export declare function base64ToBlob(base64: string, contentType?: string): Blob;
@@ -1,6 +1,8 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  /**
3
3
  * base64 转 blob
4
+ * @param base64 base64字符串
5
+ * @param contentType 文件类型
4
6
  */
5
7
  export function base64ToBlob(base64, contentType) {
6
8
  var _prefix$match;
package/es/parseQuery.js CHANGED
@@ -21,7 +21,6 @@ export function parseQuery(v, k) {
21
21
  var _step$value = _slicedToArray(_step.value, 2),
22
22
  key = _step$value[0],
23
23
  value = _step$value[1];
24
- console.log(key, value);
25
24
  res[key] = isJSONString(value) ? JSON.parse(value) : value;
26
25
  }
27
26
  } catch (err) {
@@ -1,4 +1,6 @@
1
1
  /**
2
2
  * base64 转 blob
3
+ * @param base64 base64字符串
4
+ * @param contentType 文件类型
3
5
  */
4
6
  export declare function base64ToBlob(base64: string, contentType?: string): Blob;
@@ -8,6 +8,8 @@ exports.base64ToBlob = base64ToBlob;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  /**
10
10
  * base64 转 blob
11
+ * @param base64 base64字符串
12
+ * @param contentType 文件类型
11
13
  */
12
14
  function base64ToBlob(base64, contentType) {
13
15
  var _prefix$match;
package/lib/parseQuery.js CHANGED
@@ -28,7 +28,6 @@ function parseQuery(v, k) {
28
28
  var _step$value = (0, _slicedToArray2["default"])(_step.value, 2),
29
29
  key = _step$value[0],
30
30
  value = _step$value[1];
31
- console.log(key, value);
32
31
  res[key] = (0, _isJSONString.isJSONString)(value) ? JSON.parse(value) : value;
33
32
  }
34
33
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daysnap/utils",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "description": "通用的工具库",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",