@daysnap/utils 0.0.84 → 0.0.86

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.
@@ -35,7 +35,7 @@
35
35
 
36
36
  #### Defined in
37
37
 
38
- [storage/factory.ts:3](https://github.com/daysnap/utils/blob/3bb201f/src/storage/factory.ts#L3)
38
+ [storage/factory.ts:3](https://github.com/daysnap/utils/blob/e6792a9/src/storage/factory.ts#L3)
39
39
 
40
40
  ___
41
41
 
@@ -49,7 +49,7 @@ ___
49
49
 
50
50
  #### Defined in
51
51
 
52
- [storage/factory.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/storage/factory.ts#L4)
52
+ [storage/factory.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/storage/factory.ts#L4)
53
53
 
54
54
  ___
55
55
 
@@ -69,7 +69,7 @@ ___
69
69
 
70
70
  #### Defined in
71
71
 
72
- [storage/factory.ts:2](https://github.com/daysnap/utils/blob/3bb201f/src/storage/factory.ts#L2)
72
+ [storage/factory.ts:2](https://github.com/daysnap/utils/blob/e6792a9/src/storage/factory.ts#L2)
73
73
 
74
74
  ___
75
75
 
@@ -89,4 +89,4 @@ ___
89
89
 
90
90
  #### Defined in
91
91
 
92
- [storage/factory.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/storage/factory.ts#L5)
92
+ [storage/factory.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/storage/factory.ts#L5)
@@ -31,7 +31,7 @@
31
31
 
32
32
  #### Defined in
33
33
 
34
- [trap.ts:12](https://github.com/daysnap/utils/blob/3bb201f/src/trap.ts#L12)
34
+ [trap.ts:12](https://github.com/daysnap/utils/blob/e6792a9/src/trap.ts#L12)
35
35
 
36
36
  ___
37
37
 
@@ -56,7 +56,7 @@ ___
56
56
 
57
57
  #### Defined in
58
58
 
59
- [trap.ts:10](https://github.com/daysnap/utils/blob/3bb201f/src/trap.ts#L10)
59
+ [trap.ts:10](https://github.com/daysnap/utils/blob/e6792a9/src/trap.ts#L10)
60
60
 
61
61
  ___
62
62
 
@@ -80,7 +80,7 @@ ___
80
80
 
81
81
  #### Defined in
82
82
 
83
- [trap.ts:11](https://github.com/daysnap/utils/blob/3bb201f/src/trap.ts#L11)
83
+ [trap.ts:11](https://github.com/daysnap/utils/blob/e6792a9/src/trap.ts#L11)
84
84
 
85
85
  ___
86
86
 
@@ -90,7 +90,7 @@ ___
90
90
 
91
91
  #### Defined in
92
92
 
93
- [trap.ts:8](https://github.com/daysnap/utils/blob/3bb201f/src/trap.ts#L8)
93
+ [trap.ts:8](https://github.com/daysnap/utils/blob/e6792a9/src/trap.ts#L8)
94
94
 
95
95
  ___
96
96
 
@@ -115,4 +115,4 @@ ___
115
115
 
116
116
  #### Defined in
117
117
 
118
- [trap.ts:9](https://github.com/daysnap/utils/blob/3bb201f/src/trap.ts#L9)
118
+ [trap.ts:9](https://github.com/daysnap/utils/blob/e6792a9/src/trap.ts#L9)
package/docs/modules.md CHANGED
@@ -108,6 +108,7 @@
108
108
  - [parseObject](modules.md#parseobject)
109
109
  - [parsePath](modules.md#parsepath)
110
110
  - [parseQuery](modules.md#parsequery)
111
+ - [parseQueryString](modules.md#parsequerystring)
111
112
  - [pascalCase](modules.md#pascalcase)
112
113
  - [pick](modules.md#pick)
113
114
  - [replaceCrlf](modules.md#replacecrlf)
@@ -120,6 +121,7 @@
120
121
  - [splitArray](modules.md#splitarray)
121
122
  - [stringTrim](modules.md#stringtrim)
122
123
  - [stringifyQuery](modules.md#stringifyquery)
124
+ - [stringifyQueryString](modules.md#stringifyquerystring)
123
125
  - [throttle](modules.md#throttle)
124
126
  - [throttleLeading](modules.md#throttleleading)
125
127
  - [throttleTrailing](modules.md#throttletrailing)
@@ -136,7 +138,7 @@
136
138
 
137
139
  #### Defined in
138
140
 
139
- [trap.ts:15](https://github.com/daysnap/utils/blob/3bb201f/src/trap.ts#L15)
141
+ [trap.ts:15](https://github.com/daysnap/utils/blob/e6792a9/src/trap.ts#L15)
140
142
 
141
143
  ## Functions
142
144
 
@@ -174,7 +176,7 @@ res = { '1': '男', '2': '女' }
174
176
 
175
177
  #### Defined in
176
178
 
177
- [ato.ts:12](https://github.com/daysnap/utils/blob/3bb201f/src/ato.ts#L12)
179
+ [ato.ts:12](https://github.com/daysnap/utils/blob/e6792a9/src/ato.ts#L12)
178
180
 
179
181
  ▸ **ato**<`T`, `K`\>(`options`, `labelKey`, `valueKey`): `Record`<`T`[`K`], `any`\>
180
182
 
@@ -199,7 +201,7 @@ res = { '1': '男', '2': '女' }
199
201
 
200
202
  #### Defined in
201
203
 
202
- [ato.ts:16](https://github.com/daysnap/utils/blob/3bb201f/src/ato.ts#L16)
204
+ [ato.ts:16](https://github.com/daysnap/utils/blob/e6792a9/src/ato.ts#L16)
203
205
 
204
206
  ___
205
207
 
@@ -222,7 +224,7 @@ base64 转 blob
222
224
 
223
225
  #### Defined in
224
226
 
225
- [base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/base64ToBlob.ts#L6)
227
+ [base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/base64ToBlob.ts#L6)
226
228
 
227
229
  ___
228
230
 
@@ -244,7 +246,7 @@ blob 转 base64
244
246
 
245
247
  #### Defined in
246
248
 
247
- [blobToBase64.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/blobToBase64.ts#L4)
249
+ [blobToBase64.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/blobToBase64.ts#L4)
248
250
 
249
251
  ___
250
252
 
@@ -285,7 +287,7 @@ ___
285
287
 
286
288
  #### Defined in
287
289
 
288
- [cached.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/cached.ts#L5)
290
+ [cached.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/cached.ts#L5)
289
291
 
290
292
  ___
291
293
 
@@ -308,7 +310,7 @@ camelCase('hello-world') => helloWorld
308
310
 
309
311
  #### Defined in
310
312
 
311
- [camelCase.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/camelCase.ts#L5)
313
+ [camelCase.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/camelCase.ts#L5)
312
314
 
313
315
  ___
314
316
 
@@ -332,7 +334,7 @@ canvas 转 blob 文件
332
334
 
333
335
  #### Defined in
334
336
 
335
- [canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/canvasToBlob.ts#L4)
337
+ [canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/canvasToBlob.ts#L4)
336
338
 
337
339
  ___
338
340
 
@@ -355,7 +357,7 @@ capitalize('hello world') => Hello world
355
357
 
356
358
  #### Defined in
357
359
 
358
- [capitalize.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/capitalize.ts#L5)
360
+ [capitalize.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/capitalize.ts#L5)
359
361
 
360
362
  ___
361
363
 
@@ -379,7 +381,7 @@ ___
379
381
 
380
382
  #### Defined in
381
383
 
382
- [clamp.ts:7](https://github.com/daysnap/utils/blob/3bb201f/src/clamp.ts#L7)
384
+ [clamp.ts:7](https://github.com/daysnap/utils/blob/e6792a9/src/clamp.ts#L7)
383
385
 
384
386
  ___
385
387
 
@@ -407,7 +409,7 @@ ___
407
409
 
408
410
  #### Defined in
409
411
 
410
- [clone.ts:8](https://github.com/daysnap/utils/blob/3bb201f/src/clone.ts#L8)
412
+ [clone.ts:8](https://github.com/daysnap/utils/blob/e6792a9/src/clone.ts#L8)
411
413
 
412
414
  ___
413
415
 
@@ -435,7 +437,7 @@ ___
435
437
 
436
438
  #### Defined in
437
439
 
438
- [cloneSimple.ts:7](https://github.com/daysnap/utils/blob/3bb201f/src/cloneSimple.ts#L7)
440
+ [cloneSimple.ts:7](https://github.com/daysnap/utils/blob/e6792a9/src/cloneSimple.ts#L7)
439
441
 
440
442
  ___
441
443
 
@@ -457,7 +459,7 @@ ___
457
459
 
458
460
  #### Defined in
459
461
 
460
- [createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/createHexColorByHash.ts#L4)
462
+ [createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/createHexColorByHash.ts#L4)
461
463
 
462
464
  ___
463
465
 
@@ -483,7 +485,7 @@ ___
483
485
 
484
486
  #### Defined in
485
487
 
486
- [compareVersion.ts:9](https://github.com/daysnap/utils/blob/3bb201f/src/compareVersion.ts#L9)
488
+ [compareVersion.ts:9](https://github.com/daysnap/utils/blob/e6792a9/src/compareVersion.ts#L9)
487
489
 
488
490
  ___
489
491
 
@@ -505,7 +507,7 @@ ___
505
507
 
506
508
  #### Defined in
507
509
 
508
- [compressImage.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/compressImage.ts#L6)
510
+ [compressImage.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/compressImage.ts#L6)
509
511
 
510
512
  ___
511
513
 
@@ -543,7 +545,7 @@ ___
543
545
 
544
546
  #### Defined in
545
547
 
546
- [createLinearFunction.ts:9](https://github.com/daysnap/utils/blob/3bb201f/src/createLinearFunction.ts#L9)
548
+ [createLinearFunction.ts:9](https://github.com/daysnap/utils/blob/e6792a9/src/createLinearFunction.ts#L9)
547
549
 
548
550
  ___
549
551
 
@@ -575,7 +577,7 @@ ___
575
577
 
576
578
  #### Defined in
577
579
 
578
- [trap.ts:49](https://github.com/daysnap/utils/blob/3bb201f/src/trap.ts#L49)
580
+ [trap.ts:49](https://github.com/daysnap/utils/blob/e6792a9/src/trap.ts#L49)
579
581
 
580
582
  ___
581
583
 
@@ -638,7 +640,7 @@ fn() 执行的时候就会执行showLoading
638
640
 
639
641
  #### Defined in
640
642
 
641
- [createWithLoading.ts:9](https://github.com/daysnap/utils/blob/3bb201f/src/createWithLoading.ts#L9)
643
+ [createWithLoading.ts:9](https://github.com/daysnap/utils/blob/e6792a9/src/createWithLoading.ts#L9)
642
644
 
643
645
  ___
644
646
 
@@ -681,7 +683,7 @@ ___
681
683
 
682
684
  #### Defined in
683
685
 
684
- [debounce.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/debounce.ts#L5)
686
+ [debounce.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/debounce.ts#L5)
685
687
 
686
688
  ___
687
689
 
@@ -705,7 +707,7 @@ ___
705
707
 
706
708
  #### Defined in
707
709
 
708
- [downloadFile.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/downloadFile.ts#L4)
710
+ [downloadFile.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/downloadFile.ts#L4)
709
711
 
710
712
  ___
711
713
 
@@ -734,7 +736,7 @@ ___
734
736
 
735
737
  #### Defined in
736
738
 
737
- [each.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/each.ts#L4)
739
+ [each.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/each.ts#L4)
738
740
 
739
741
  ▸ **each**<`T`\>(`data`, `callback`): `void`
740
742
 
@@ -757,7 +759,7 @@ ___
757
759
 
758
760
  #### Defined in
759
761
 
760
- [each.ts:8](https://github.com/daysnap/utils/blob/3bb201f/src/each.ts#L8)
762
+ [each.ts:8](https://github.com/daysnap/utils/blob/e6792a9/src/each.ts#L8)
761
763
 
762
764
  ___
763
765
 
@@ -775,7 +777,7 @@ ___
775
777
 
776
778
  #### Defined in
777
779
 
778
- [exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/exitFullscreen.ts#L6)
780
+ [exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/exitFullscreen.ts#L6)
779
781
 
780
782
  ___
781
783
 
@@ -804,7 +806,7 @@ ___
804
806
 
805
807
  #### Defined in
806
808
 
807
- [storage/factory.ts:8](https://github.com/daysnap/utils/blob/3bb201f/src/storage/factory.ts#L8)
809
+ [storage/factory.ts:8](https://github.com/daysnap/utils/blob/e6792a9/src/storage/factory.ts#L8)
808
810
 
809
811
  ___
810
812
 
@@ -826,7 +828,7 @@ ___
826
828
 
827
829
  #### Defined in
828
830
 
829
- [filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/filterBankCardNo.ts#L4)
831
+ [filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/filterBankCardNo.ts#L4)
830
832
 
831
833
  ___
832
834
 
@@ -848,7 +850,7 @@ ___
848
850
 
849
851
  #### Defined in
850
852
 
851
- [filterCRLF.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/filterCRLF.ts#L4)
853
+ [filterCRLF.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/filterCRLF.ts#L4)
852
854
 
853
855
  ___
854
856
 
@@ -870,7 +872,7 @@ ___
870
872
 
871
873
  #### Defined in
872
874
 
873
- [filterEmoji.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/filterEmoji.ts#L4)
875
+ [filterEmoji.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/filterEmoji.ts#L4)
874
876
 
875
877
  ___
876
878
 
@@ -893,7 +895,7 @@ ___
893
895
 
894
896
  #### Defined in
895
897
 
896
- [filterEmptyValue.ts:12](https://github.com/daysnap/utils/blob/3bb201f/src/filterEmptyValue.ts#L12)
898
+ [filterEmptyValue.ts:12](https://github.com/daysnap/utils/blob/e6792a9/src/filterEmptyValue.ts#L12)
897
899
 
898
900
  ___
899
901
 
@@ -916,7 +918,7 @@ ___
916
918
 
917
919
  #### Defined in
918
920
 
919
- [filterIdCard.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/filterIdCard.ts#L5)
921
+ [filterIdCard.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/filterIdCard.ts#L5)
920
922
 
921
923
  ___
922
924
 
@@ -938,7 +940,7 @@ ___
938
940
 
939
941
  #### Defined in
940
942
 
941
- [filterName.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/filterName.ts#L4)
943
+ [filterName.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/filterName.ts#L4)
942
944
 
943
945
  ___
944
946
 
@@ -963,7 +965,7 @@ filterPhone('13177778888', ' ') => 131 **** 8888
963
965
 
964
966
  #### Defined in
965
967
 
966
- [filterPhone.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/filterPhone.ts#L6)
968
+ [filterPhone.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/filterPhone.ts#L6)
967
969
 
968
970
  ___
969
971
 
@@ -990,7 +992,7 @@ str = '131****8888'
990
992
 
991
993
  #### Defined in
992
994
 
993
- [filterString.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/filterString.ts#L6)
995
+ [filterString.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/filterString.ts#L6)
994
996
 
995
997
  ___
996
998
 
@@ -1013,7 +1015,7 @@ ___
1013
1015
 
1014
1016
  #### Defined in
1015
1017
 
1016
- [formatAmount.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/formatAmount.ts#L4)
1018
+ [formatAmount.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/formatAmount.ts#L4)
1017
1019
 
1018
1020
  ___
1019
1021
 
@@ -1037,7 +1039,7 @@ ___
1037
1039
 
1038
1040
  #### Defined in
1039
1041
 
1040
- [formatDate.ts:8](https://github.com/daysnap/utils/blob/3bb201f/src/formatDate.ts#L8)
1042
+ [formatDate.ts:8](https://github.com/daysnap/utils/blob/e6792a9/src/formatDate.ts#L8)
1041
1043
 
1042
1044
  ___
1043
1045
 
@@ -1060,7 +1062,7 @@ fix iOS 日期时间格式如果是 - 就会报错的问题
1060
1062
 
1061
1063
  #### Defined in
1062
1064
 
1063
- [formatDateStr.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/formatDateStr.ts#L5)
1065
+ [formatDateStr.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/formatDateStr.ts#L5)
1064
1066
 
1065
1067
  ___
1066
1068
 
@@ -1080,7 +1082,7 @@ ___
1080
1082
 
1081
1083
  #### Defined in
1082
1084
 
1083
- [formartDateToZN.ts:3](https://github.com/daysnap/utils/blob/3bb201f/src/formartDateToZN.ts#L3)
1085
+ [formartDateToZN.ts:3](https://github.com/daysnap/utils/blob/e6792a9/src/formartDateToZN.ts#L3)
1084
1086
 
1085
1087
  ___
1086
1088
 
@@ -1105,7 +1107,7 @@ formatMessage({ a: '123', b: { ba: '456' } }, ['b.ba']) => '456'
1105
1107
 
1106
1108
  #### Defined in
1107
1109
 
1108
- [formatMessage.ts:11](https://github.com/daysnap/utils/blob/3bb201f/src/formatMessage.ts#L11)
1110
+ [formatMessage.ts:11](https://github.com/daysnap/utils/blob/e6792a9/src/formatMessage.ts#L11)
1109
1111
 
1110
1112
  ___
1111
1113
 
@@ -1137,7 +1139,7 @@ rest = { xxx: 1 }
1137
1139
 
1138
1140
  #### Defined in
1139
1141
 
1140
- [formatPathParams.ts:8](https://github.com/daysnap/utils/blob/3bb201f/src/formatPathParams.ts#L8)
1142
+ [formatPathParams.ts:8](https://github.com/daysnap/utils/blob/e6792a9/src/formatPathParams.ts#L8)
1141
1143
 
1142
1144
  ___
1143
1145
 
@@ -1159,7 +1161,7 @@ ___
1159
1161
 
1160
1162
  #### Defined in
1161
1163
 
1162
- [getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/getBlobByUrl.ts#L4)
1164
+ [getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/getBlobByUrl.ts#L4)
1163
1165
 
1164
1166
  ___
1165
1167
 
@@ -1182,7 +1184,7 @@ ___
1182
1184
 
1183
1185
  #### Defined in
1184
1186
 
1185
- [storage/index.ts:9](https://github.com/daysnap/utils/blob/3bb201f/src/storage/index.ts#L9)
1187
+ [storage/index.ts:9](https://github.com/daysnap/utils/blob/e6792a9/src/storage/index.ts#L9)
1186
1188
 
1187
1189
  ___
1188
1190
 
@@ -1204,7 +1206,7 @@ ___
1204
1206
 
1205
1207
  #### Defined in
1206
1208
 
1207
- [getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/getDayMillisecond.ts#L4)
1209
+ [getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/getDayMillisecond.ts#L4)
1208
1210
 
1209
1211
  ___
1210
1212
 
@@ -1226,7 +1228,7 @@ ___
1226
1228
 
1227
1229
  #### Defined in
1228
1230
 
1229
- [getImageInfo.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/getImageInfo.ts#L4)
1231
+ [getImageInfo.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/getImageInfo.ts#L4)
1230
1232
 
1231
1233
  ___
1232
1234
 
@@ -1249,7 +1251,7 @@ ___
1249
1251
 
1250
1252
  #### Defined in
1251
1253
 
1252
- [storage/index.ts:9](https://github.com/daysnap/utils/blob/3bb201f/src/storage/index.ts#L9)
1254
+ [storage/index.ts:9](https://github.com/daysnap/utils/blob/e6792a9/src/storage/index.ts#L9)
1253
1255
 
1254
1256
  ___
1255
1257
 
@@ -1272,7 +1274,7 @@ ___
1272
1274
 
1273
1275
  #### Defined in
1274
1276
 
1275
- [getRandom.ts:7](https://github.com/daysnap/utils/blob/3bb201f/src/getRandom.ts#L7)
1277
+ [getRandom.ts:7](https://github.com/daysnap/utils/blob/e6792a9/src/getRandom.ts#L7)
1276
1278
 
1277
1279
  ___
1278
1280
 
@@ -1288,7 +1290,7 @@ ___
1288
1290
 
1289
1291
  #### Defined in
1290
1292
 
1291
- [getRandomColor.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/getRandomColor.ts#L4)
1293
+ [getRandomColor.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/getRandomColor.ts#L4)
1292
1294
 
1293
1295
  ___
1294
1296
 
@@ -1310,7 +1312,7 @@ ___
1310
1312
 
1311
1313
  #### Defined in
1312
1314
 
1313
- [getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/3bb201f/src/getRandomNumber.ts#L7)
1315
+ [getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/e6792a9/src/getRandomNumber.ts#L7)
1314
1316
 
1315
1317
  ___
1316
1318
 
@@ -1332,7 +1334,7 @@ ___
1332
1334
 
1333
1335
  #### Defined in
1334
1336
 
1335
- [getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/getVideoInfo.ts#L4)
1337
+ [getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/getVideoInfo.ts#L4)
1336
1338
 
1337
1339
  ___
1338
1340
 
@@ -1348,7 +1350,7 @@ ___
1348
1350
 
1349
1351
  #### Defined in
1350
1352
 
1351
- [inBrowser.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/inBrowser.ts#L4)
1353
+ [inBrowser.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/inBrowser.ts#L4)
1352
1354
 
1353
1355
  ___
1354
1356
 
@@ -1370,7 +1372,7 @@ ___
1370
1372
 
1371
1373
  #### Defined in
1372
1374
 
1373
- [insertLink.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/insertLink.ts#L4)
1375
+ [insertLink.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/insertLink.ts#L4)
1374
1376
 
1375
1377
  ▸ **insertLink**(`href`, `callback`): `void`
1376
1378
 
@@ -1387,7 +1389,7 @@ ___
1387
1389
 
1388
1390
  #### Defined in
1389
1391
 
1390
- [insertLink.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/insertLink.ts#L5)
1392
+ [insertLink.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/insertLink.ts#L5)
1391
1393
 
1392
1394
  ___
1393
1395
 
@@ -1409,7 +1411,7 @@ ___
1409
1411
 
1410
1412
  #### Defined in
1411
1413
 
1412
- [insertScript.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/insertScript.ts#L4)
1414
+ [insertScript.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/insertScript.ts#L4)
1413
1415
 
1414
1416
  ▸ **insertScript**(`src`, `callback`): `void`
1415
1417
 
@@ -1426,7 +1428,7 @@ ___
1426
1428
 
1427
1429
  #### Defined in
1428
1430
 
1429
- [insertScript.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/insertScript.ts#L5)
1431
+ [insertScript.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/insertScript.ts#L5)
1430
1432
 
1431
1433
  ___
1432
1434
 
@@ -1448,7 +1450,7 @@ ___
1448
1450
 
1449
1451
  #### Defined in
1450
1452
 
1451
- [insertStyle.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/insertStyle.ts#L4)
1453
+ [insertStyle.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/insertStyle.ts#L4)
1452
1454
 
1453
1455
  ___
1454
1456
 
@@ -1477,7 +1479,7 @@ isAmount('1.123') => false
1477
1479
 
1478
1480
  #### Defined in
1479
1481
 
1480
- [isAmount.ts:11](https://github.com/daysnap/utils/blob/3bb201f/src/isAmount.ts#L11)
1482
+ [isAmount.ts:11](https://github.com/daysnap/utils/blob/e6792a9/src/isAmount.ts#L11)
1481
1483
 
1482
1484
  ___
1483
1485
 
@@ -1493,7 +1495,7 @@ ___
1493
1495
 
1494
1496
  #### Defined in
1495
1497
 
1496
- [isAndroid.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isAndroid.ts#L4)
1498
+ [isAndroid.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isAndroid.ts#L4)
1497
1499
 
1498
1500
  ___
1499
1501
 
@@ -1517,7 +1519,7 @@ val is any[]
1517
1519
 
1518
1520
  #### Defined in
1519
1521
 
1520
- [isArray.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/isArray.ts#L6)
1522
+ [isArray.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/isArray.ts#L6)
1521
1523
 
1522
1524
  ___
1523
1525
 
@@ -1539,7 +1541,7 @@ val is boolean
1539
1541
 
1540
1542
  #### Defined in
1541
1543
 
1542
- [isBoolean.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/isBoolean.ts#L5)
1544
+ [isBoolean.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/isBoolean.ts#L5)
1543
1545
 
1544
1546
  ___
1545
1547
 
@@ -1561,7 +1563,7 @@ ___
1561
1563
 
1562
1564
  #### Defined in
1563
1565
 
1564
- [isChinese.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isChinese.ts#L4)
1566
+ [isChinese.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isChinese.ts#L4)
1565
1567
 
1566
1568
  ___
1567
1569
 
@@ -1583,7 +1585,7 @@ val is Date
1583
1585
 
1584
1586
  #### Defined in
1585
1587
 
1586
- [isDate.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isDate.ts#L4)
1588
+ [isDate.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isDate.ts#L4)
1587
1589
 
1588
1590
  ___
1589
1591
 
@@ -1605,7 +1607,7 @@ ___
1605
1607
 
1606
1608
  #### Defined in
1607
1609
 
1608
- [isEmail.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isEmail.ts#L4)
1610
+ [isEmail.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isEmail.ts#L4)
1609
1611
 
1610
1612
  ___
1611
1613
 
@@ -1627,7 +1629,7 @@ ___
1627
1629
 
1628
1630
  #### Defined in
1629
1631
 
1630
- [isEmpty.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/isEmpty.ts#L6)
1632
+ [isEmpty.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/isEmpty.ts#L6)
1631
1633
 
1632
1634
  ___
1633
1635
 
@@ -1649,7 +1651,7 @@ ___
1649
1651
 
1650
1652
  #### Defined in
1651
1653
 
1652
- [isEmptyArray.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/isEmptyArray.ts#L6)
1654
+ [isEmptyArray.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/isEmptyArray.ts#L6)
1653
1655
 
1654
1656
  ___
1655
1657
 
@@ -1671,7 +1673,7 @@ ___
1671
1673
 
1672
1674
  #### Defined in
1673
1675
 
1674
- [isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/isEmptyObject.ts#L5)
1676
+ [isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/isEmptyObject.ts#L5)
1675
1677
 
1676
1678
  ___
1677
1679
 
@@ -1693,7 +1695,7 @@ val is Error
1693
1695
 
1694
1696
  #### Defined in
1695
1697
 
1696
- [isError.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isError.ts#L4)
1698
+ [isError.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isError.ts#L4)
1697
1699
 
1698
1700
  ___
1699
1701
 
@@ -1715,7 +1717,7 @@ val is Function
1715
1717
 
1716
1718
  #### Defined in
1717
1719
 
1718
- [isFunction.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isFunction.ts#L4)
1720
+ [isFunction.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isFunction.ts#L4)
1719
1721
 
1720
1722
  ___
1721
1723
 
@@ -1733,7 +1735,7 @@ ___
1733
1735
 
1734
1736
  #### Defined in
1735
1737
 
1736
- [isIE.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/isIE.ts#L6)
1738
+ [isIE.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/isIE.ts#L6)
1737
1739
 
1738
1740
  ___
1739
1741
 
@@ -1749,7 +1751,7 @@ ___
1749
1751
 
1750
1752
  #### Defined in
1751
1753
 
1752
- [isIOS.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isIOS.ts#L4)
1754
+ [isIOS.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isIOS.ts#L4)
1753
1755
 
1754
1756
  ___
1755
1757
 
@@ -1771,7 +1773,7 @@ ___
1771
1773
 
1772
1774
  #### Defined in
1773
1775
 
1774
- [isIdCard.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isIdCard.ts#L4)
1776
+ [isIdCard.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isIdCard.ts#L4)
1775
1777
 
1776
1778
  ___
1777
1779
 
@@ -1793,7 +1795,7 @@ ___
1793
1795
 
1794
1796
  #### Defined in
1795
1797
 
1796
- [isJSONString.ts:7](https://github.com/daysnap/utils/blob/3bb201f/src/isJSONString.ts#L7)
1798
+ [isJSONString.ts:7](https://github.com/daysnap/utils/blob/e6792a9/src/isJSONString.ts#L7)
1797
1799
 
1798
1800
  ___
1799
1801
 
@@ -1815,7 +1817,7 @@ ___
1815
1817
 
1816
1818
  #### Defined in
1817
1819
 
1818
- [isLan.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/isLan.ts#L5)
1820
+ [isLan.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/isLan.ts#L5)
1819
1821
 
1820
1822
  ___
1821
1823
 
@@ -1837,7 +1839,7 @@ ___
1837
1839
 
1838
1840
  #### Defined in
1839
1841
 
1840
- [isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/isLicenseCode.ts#L5)
1842
+ [isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/isLicenseCode.ts#L5)
1841
1843
 
1842
1844
  ___
1843
1845
 
@@ -1853,7 +1855,7 @@ ___
1853
1855
 
1854
1856
  #### Defined in
1855
1857
 
1856
- [isMobile.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isMobile.ts#L4)
1858
+ [isMobile.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isMobile.ts#L4)
1857
1859
 
1858
1860
  ___
1859
1861
 
@@ -1876,7 +1878,7 @@ ___
1876
1878
 
1877
1879
  #### Defined in
1878
1880
 
1879
- [isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/3bb201f/src/isNativeFunction.ts#L7)
1881
+ [isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/e6792a9/src/isNativeFunction.ts#L7)
1880
1882
 
1881
1883
  ___
1882
1884
 
@@ -1898,7 +1900,7 @@ val is null
1898
1900
 
1899
1901
  #### Defined in
1900
1902
 
1901
- [isNull.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isNull.ts#L4)
1903
+ [isNull.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isNull.ts#L4)
1902
1904
 
1903
1905
  ___
1904
1906
 
@@ -1920,7 +1922,7 @@ val is number
1920
1922
 
1921
1923
  #### Defined in
1922
1924
 
1923
- [isNumber.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/isNumber.ts#L5)
1925
+ [isNumber.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/isNumber.ts#L5)
1924
1926
 
1925
1927
  ___
1926
1928
 
@@ -1942,7 +1944,7 @@ val is Record<string, any\>
1942
1944
 
1943
1945
  #### Defined in
1944
1946
 
1945
- [isObject.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isObject.ts#L4)
1947
+ [isObject.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isObject.ts#L4)
1946
1948
 
1947
1949
  ___
1948
1950
 
@@ -1964,7 +1966,7 @@ ___
1964
1966
 
1965
1967
  #### Defined in
1966
1968
 
1967
- [isPhone.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isPhone.ts#L4)
1969
+ [isPhone.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isPhone.ts#L4)
1968
1970
 
1969
1971
  ___
1970
1972
 
@@ -1992,7 +1994,7 @@ val is Promise<T\>
1992
1994
 
1993
1995
  #### Defined in
1994
1996
 
1995
- [isPromise.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isPromise.ts#L4)
1997
+ [isPromise.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isPromise.ts#L4)
1996
1998
 
1997
1999
  ___
1998
2000
 
@@ -2014,7 +2016,7 @@ val is RegExp
2014
2016
 
2015
2017
  #### Defined in
2016
2018
 
2017
- [isRegExp.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isRegExp.ts#L4)
2019
+ [isRegExp.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isRegExp.ts#L4)
2018
2020
 
2019
2021
  ___
2020
2022
 
@@ -2036,7 +2038,7 @@ val is string
2036
2038
 
2037
2039
  #### Defined in
2038
2040
 
2039
- [isString.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isString.ts#L4)
2041
+ [isString.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isString.ts#L4)
2040
2042
 
2041
2043
  ___
2042
2044
 
@@ -2058,7 +2060,7 @@ val is undefined
2058
2060
 
2059
2061
  #### Defined in
2060
2062
 
2061
- [isUndefined.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isUndefined.ts#L4)
2063
+ [isUndefined.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isUndefined.ts#L4)
2062
2064
 
2063
2065
  ___
2064
2066
 
@@ -2096,7 +2098,7 @@ ___
2096
2098
 
2097
2099
  #### Defined in
2098
2100
 
2099
- [isWeChat.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/isWeChat.ts#L4)
2101
+ [isWeChat.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/isWeChat.ts#L4)
2100
2102
 
2101
2103
  ___
2102
2104
 
@@ -2113,7 +2115,7 @@ https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html
2113
2115
 
2114
2116
  #### Defined in
2115
2117
 
2116
- [isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/isWeChatMiniProgram.ts#L5)
2118
+ [isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/isWeChatMiniProgram.ts#L5)
2117
2119
 
2118
2120
  ___
2119
2121
 
@@ -2133,7 +2135,7 @@ ___
2133
2135
 
2134
2136
  #### Defined in
2135
2137
 
2136
- [isWeChat.ts:12](https://github.com/daysnap/utils/blob/3bb201f/src/isWeChat.ts#L12)
2138
+ [isWeChat.ts:12](https://github.com/daysnap/utils/blob/e6792a9/src/isWeChat.ts#L12)
2137
2139
 
2138
2140
  ___
2139
2141
 
@@ -2155,7 +2157,7 @@ val is Window
2155
2157
 
2156
2158
  #### Defined in
2157
2159
 
2158
- [isWindow.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/isWindow.ts#L5)
2160
+ [isWindow.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/isWindow.ts#L5)
2159
2161
 
2160
2162
  ___
2161
2163
 
@@ -2178,7 +2180,7 @@ kebabCase('helloWorld') => hello-world
2178
2180
 
2179
2181
  #### Defined in
2180
2182
 
2181
- [kebabCase.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/kebabCase.ts#L5)
2183
+ [kebabCase.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/kebabCase.ts#L5)
2182
2184
 
2183
2185
  ___
2184
2186
 
@@ -2207,7 +2209,7 @@ list 生成器,快速生成数据
2207
2209
 
2208
2210
  #### Defined in
2209
2211
 
2210
- [listGenerator.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/listGenerator.ts#L5)
2212
+ [listGenerator.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/listGenerator.ts#L5)
2211
2213
 
2212
2214
  ___
2213
2215
 
@@ -2232,7 +2234,7 @@ ___
2232
2234
 
2233
2235
  #### Defined in
2234
2236
 
2235
- [mousewheel.ts:22](https://github.com/daysnap/utils/blob/3bb201f/src/mousewheel.ts#L22)
2237
+ [mousewheel.ts:22](https://github.com/daysnap/utils/blob/e6792a9/src/mousewheel.ts#L22)
2236
2238
 
2237
2239
  ___
2238
2240
 
@@ -2248,7 +2250,7 @@ ___
2248
2250
 
2249
2251
  #### Defined in
2250
2252
 
2251
- [nf.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/nf.ts#L4)
2253
+ [nf.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/nf.ts#L4)
2252
2254
 
2253
2255
  ___
2254
2256
 
@@ -2270,7 +2272,7 @@ ___
2270
2272
 
2271
2273
  #### Defined in
2272
2274
 
2273
- [normalizePath.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/normalizePath.ts#L4)
2275
+ [normalizePath.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/normalizePath.ts#L4)
2274
2276
 
2275
2277
  ___
2276
2278
 
@@ -2300,7 +2302,7 @@ ___
2300
2302
 
2301
2303
  #### Defined in
2302
2304
 
2303
- [omit.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/omit.ts#L4)
2305
+ [omit.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/omit.ts#L4)
2304
2306
 
2305
2307
  ___
2306
2308
 
@@ -2324,7 +2326,7 @@ ___
2324
2326
 
2325
2327
  #### Defined in
2326
2328
 
2327
- [padding.ts:7](https://github.com/daysnap/utils/blob/3bb201f/src/padding.ts#L7)
2329
+ [padding.ts:7](https://github.com/daysnap/utils/blob/e6792a9/src/padding.ts#L7)
2328
2330
 
2329
2331
  ___
2330
2332
 
@@ -2346,7 +2348,7 @@ ___
2346
2348
 
2347
2349
  #### Defined in
2348
2350
 
2349
- [parseDate.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/parseDate.ts#L4)
2351
+ [parseDate.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/parseDate.ts#L4)
2350
2352
 
2351
2353
  ___
2352
2354
 
@@ -2369,7 +2371,7 @@ ___
2369
2371
 
2370
2372
  #### Defined in
2371
2373
 
2372
- [parseError.ts:8](https://github.com/daysnap/utils/blob/3bb201f/src/parseError.ts#L8)
2374
+ [parseError.ts:8](https://github.com/daysnap/utils/blob/e6792a9/src/parseError.ts#L8)
2373
2375
 
2374
2376
  ___
2375
2377
 
@@ -2399,7 +2401,7 @@ parseObject('a.b.c', 1) => { a: { b: { c: 1 } } }
2399
2401
 
2400
2402
  #### Defined in
2401
2403
 
2402
- [parseObject.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/parseObject.ts#L5)
2404
+ [parseObject.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/parseObject.ts#L5)
2403
2405
 
2404
2406
  ___
2405
2407
 
@@ -2428,7 +2430,7 @@ ___
2428
2430
 
2429
2431
  #### Defined in
2430
2432
 
2431
- [parsePath.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/parsePath.ts#L6)
2433
+ [parsePath.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/parsePath.ts#L6)
2432
2434
 
2433
2435
  ___
2434
2436
 
@@ -2451,7 +2453,37 @@ ___
2451
2453
 
2452
2454
  #### Defined in
2453
2455
 
2454
- [parseQuery.ts:8](https://github.com/daysnap/utils/blob/3bb201f/src/parseQuery.ts#L8)
2456
+ [parseQuery.ts:8](https://github.com/daysnap/utils/blob/e6792a9/src/parseQuery.ts#L8)
2457
+
2458
+ ___
2459
+
2460
+ ### parseQueryString
2461
+
2462
+ ▸ **parseQueryString**<`T`\>(`value`): `T`
2463
+
2464
+ 解析 url 参数
2465
+
2466
+ 在不支持 URLSearchParams 的环境下使用该方法
2467
+
2468
+ #### Type parameters
2469
+
2470
+ | Name | Type |
2471
+ | :------ | :------ |
2472
+ | `T` | extends `Record`<`string`, `any`\> |
2473
+
2474
+ #### Parameters
2475
+
2476
+ | Name | Type |
2477
+ | :------ | :------ |
2478
+ | `value` | `string` |
2479
+
2480
+ #### Returns
2481
+
2482
+ `T`
2483
+
2484
+ #### Defined in
2485
+
2486
+ [parseQueryString.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/parseQueryString.ts#L6)
2455
2487
 
2456
2488
  ___
2457
2489
 
@@ -2474,7 +2506,7 @@ pascalCase('hello-world') => HelloWorld
2474
2506
 
2475
2507
  #### Defined in
2476
2508
 
2477
- [pascalCase.ts:8](https://github.com/daysnap/utils/blob/3bb201f/src/pascalCase.ts#L8)
2509
+ [pascalCase.ts:8](https://github.com/daysnap/utils/blob/e6792a9/src/pascalCase.ts#L8)
2478
2510
 
2479
2511
  ___
2480
2512
 
@@ -2504,7 +2536,7 @@ ___
2504
2536
 
2505
2537
  #### Defined in
2506
2538
 
2507
- [pick.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/pick.ts#L4)
2539
+ [pick.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/pick.ts#L4)
2508
2540
 
2509
2541
  ___
2510
2542
 
@@ -2527,7 +2559,7 @@ ___
2527
2559
 
2528
2560
  #### Defined in
2529
2561
 
2530
- [replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/replaceCrlf.ts#L4)
2562
+ [replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/replaceCrlf.ts#L4)
2531
2563
 
2532
2564
  ___
2533
2565
 
@@ -2551,7 +2583,7 @@ ___
2551
2583
 
2552
2584
  #### Defined in
2553
2585
 
2554
- [requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/requestFullScreen.ts#L6)
2586
+ [requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/requestFullScreen.ts#L6)
2555
2587
 
2556
2588
  ___
2557
2589
 
@@ -2577,7 +2609,7 @@ reserve(0, '--') => 0
2577
2609
 
2578
2610
  #### Defined in
2579
2611
 
2580
- [reserve.ts:8](https://github.com/daysnap/utils/blob/3bb201f/src/reserve.ts#L8)
2612
+ [reserve.ts:8](https://github.com/daysnap/utils/blob/e6792a9/src/reserve.ts#L8)
2581
2613
 
2582
2614
  ___
2583
2615
 
@@ -2601,7 +2633,7 @@ ___
2601
2633
 
2602
2634
  #### Defined in
2603
2635
 
2604
- [rgbToHex.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/rgbToHex.ts#L4)
2636
+ [rgbToHex.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/rgbToHex.ts#L4)
2605
2637
 
2606
2638
  ___
2607
2639
 
@@ -2624,7 +2656,7 @@ ___
2624
2656
 
2625
2657
  #### Defined in
2626
2658
 
2627
- [round.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/round.ts#L6)
2659
+ [round.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/round.ts#L6)
2628
2660
 
2629
2661
  ___
2630
2662
 
@@ -2640,7 +2672,7 @@ ___
2640
2672
 
2641
2673
  #### Defined in
2642
2674
 
2643
- [scrollToTop.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/scrollToTop.ts#L4)
2675
+ [scrollToTop.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/scrollToTop.ts#L4)
2644
2676
 
2645
2677
  ___
2646
2678
 
@@ -2663,7 +2695,7 @@ ___
2663
2695
 
2664
2696
  #### Defined in
2665
2697
 
2666
- [sleep.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/sleep.ts#L6)
2698
+ [sleep.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/sleep.ts#L6)
2667
2699
 
2668
2700
  ___
2669
2701
 
@@ -2692,7 +2724,7 @@ ___
2692
2724
 
2693
2725
  #### Defined in
2694
2726
 
2695
- [splitArray.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/splitArray.ts#L4)
2727
+ [splitArray.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/splitArray.ts#L4)
2696
2728
 
2697
2729
  ___
2698
2730
 
@@ -2715,7 +2747,7 @@ ___
2715
2747
 
2716
2748
  #### Defined in
2717
2749
 
2718
- [stringTrim.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/stringTrim.ts#L6)
2750
+ [stringTrim.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/stringTrim.ts#L6)
2719
2751
 
2720
2752
  ___
2721
2753
 
@@ -2737,7 +2769,31 @@ ___
2737
2769
 
2738
2770
  #### Defined in
2739
2771
 
2740
- [stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/3bb201f/src/stringifyQuery.ts#L7)
2772
+ [stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/e6792a9/src/stringifyQuery.ts#L7)
2773
+
2774
+ ___
2775
+
2776
+ ### stringifyQueryString
2777
+
2778
+ ▸ **stringifyQueryString**(`value`): `string`
2779
+
2780
+ 将对象转换为查询字符串
2781
+
2782
+ 在不支持 URLSearchParams 的环境下使用该方法
2783
+
2784
+ #### Parameters
2785
+
2786
+ | Name | Type |
2787
+ | :------ | :------ |
2788
+ | `value` | `Record`<`string`, `any`\> |
2789
+
2790
+ #### Returns
2791
+
2792
+ `string`
2793
+
2794
+ #### Defined in
2795
+
2796
+ [stringifyQueryString.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/stringifyQueryString.ts#L6)
2741
2797
 
2742
2798
  ___
2743
2799
 
@@ -2781,7 +2837,7 @@ ___
2781
2837
 
2782
2838
  #### Defined in
2783
2839
 
2784
- [throttle.ts:48](https://github.com/daysnap/utils/blob/3bb201f/src/throttle.ts#L48)
2840
+ [throttle.ts:48](https://github.com/daysnap/utils/blob/e6792a9/src/throttle.ts#L48)
2785
2841
 
2786
2842
  ___
2787
2843
 
@@ -2824,7 +2880,7 @@ ___
2824
2880
 
2825
2881
  #### Defined in
2826
2882
 
2827
- [throttle.ts:5](https://github.com/daysnap/utils/blob/3bb201f/src/throttle.ts#L5)
2883
+ [throttle.ts:5](https://github.com/daysnap/utils/blob/e6792a9/src/throttle.ts#L5)
2828
2884
 
2829
2885
  ___
2830
2886
 
@@ -2867,7 +2923,7 @@ ___
2867
2923
 
2868
2924
  #### Defined in
2869
2925
 
2870
- [throttle.ts:25](https://github.com/daysnap/utils/blob/3bb201f/src/throttle.ts#L25)
2926
+ [throttle.ts:25](https://github.com/daysnap/utils/blob/e6792a9/src/throttle.ts#L25)
2871
2927
 
2872
2928
  ___
2873
2929
 
@@ -2889,7 +2945,7 @@ ___
2889
2945
 
2890
2946
  #### Defined in
2891
2947
 
2892
- [toCDB.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/toCDB.ts#L4)
2948
+ [toCDB.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/toCDB.ts#L4)
2893
2949
 
2894
2950
  ___
2895
2951
 
@@ -2911,7 +2967,7 @@ ___
2911
2967
 
2912
2968
  #### Defined in
2913
2969
 
2914
- [toDBC.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/toDBC.ts#L4)
2970
+ [toDBC.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/toDBC.ts#L4)
2915
2971
 
2916
2972
  ___
2917
2973
 
@@ -2935,7 +2991,7 @@ ___
2935
2991
 
2936
2992
  #### Defined in
2937
2993
 
2938
- [typeOf.ts:6](https://github.com/daysnap/utils/blob/3bb201f/src/typeOf.ts#L6)
2994
+ [typeOf.ts:6](https://github.com/daysnap/utils/blob/e6792a9/src/typeOf.ts#L6)
2939
2995
 
2940
2996
  ___
2941
2997
 
@@ -2964,4 +3020,4 @@ ___
2964
3020
 
2965
3021
  #### Defined in
2966
3022
 
2967
- [withPreventConsecutiveClicks.ts:4](https://github.com/daysnap/utils/blob/3bb201f/src/withPreventConsecutiveClicks.ts#L4)
3023
+ [withPreventConsecutiveClicks.ts:4](https://github.com/daysnap/utils/blob/e6792a9/src/withPreventConsecutiveClicks.ts#L4)
@@ -7,7 +7,11 @@ export function base64ToBlob(base64, contentType) {
7
7
  var _a;
8
8
  const [prefix, rest] = base64.split(',');
9
9
  const type = contentType !== null && contentType !== void 0 ? contentType : (_a = prefix.match(/:(.*?);/)) === null || _a === void 0 ? void 0 : _a[1];
10
- const data = window.atob(rest);
10
+ // 还是选用直接 atob
11
+ // const data = inBrowser()
12
+ // ? window.atob(rest)
13
+ // : Buffer.from(rest, 'base64').toString('binary')
14
+ const data = atob(rest);
11
15
  let len = data.length;
12
16
  const u8arr = new Uint8Array(len);
13
17
  while (len--) {
package/es/index.d.ts CHANGED
@@ -86,6 +86,7 @@ export * from './parseError';
86
86
  export * from './parseObject';
87
87
  export * from './parsePath';
88
88
  export * from './parseQuery';
89
+ export * from './parseQueryString';
89
90
  export * from './pascalCase';
90
91
  export * from './pick';
91
92
  export * from './replaceCrlf';
@@ -99,6 +100,7 @@ export * from './splitArray';
99
100
  export * from './storage';
100
101
  export * from './stringTrim';
101
102
  export * from './stringifyQuery';
103
+ export * from './stringifyQueryString';
102
104
  export * from './throttle';
103
105
  export * from './toCDB';
104
106
  export * from './toDBC';
package/es/index.js CHANGED
@@ -87,6 +87,7 @@ export * from './parseError';
87
87
  export * from './parseObject';
88
88
  export * from './parsePath';
89
89
  export * from './parseQuery';
90
+ export * from './parseQueryString';
90
91
  export * from './pascalCase';
91
92
  export * from './pick';
92
93
  export * from './replaceCrlf';
@@ -100,6 +101,7 @@ export * from './splitArray';
100
101
  export * from './storage';
101
102
  export * from './stringTrim';
102
103
  export * from './stringifyQuery';
104
+ export * from './stringifyQueryString';
103
105
  export * from './throttle';
104
106
  export * from './toCDB';
105
107
  export * from './toDBC';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 解析 url 参数
3
+ *
4
+ * 在不支持 URLSearchParams 的环境下使用该方法
5
+ */
6
+ export declare function parseQueryString<T extends Record<string, any>>(value: string): T;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 解析 url 参数
3
+ *
4
+ * 在不支持 URLSearchParams 的环境下使用该方法
5
+ */
6
+ export function parseQueryString(value) {
7
+ return decodeURIComponent(value)
8
+ .split('&')
9
+ .reduce((res, item) => {
10
+ const [key, value] = item.split('=');
11
+ res[key] = value;
12
+ return res;
13
+ }, {});
14
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 将对象转换为查询字符串
3
+ *
4
+ * 在不支持 URLSearchParams 的环境下使用该方法
5
+ */
6
+ export declare function stringifyQueryString(value: Record<string, any>): string;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 将对象转换为查询字符串
3
+ *
4
+ * 在不支持 URLSearchParams 的环境下使用该方法
5
+ */
6
+ export function stringifyQueryString(value) {
7
+ return Object.keys(value)
8
+ .reduce((res, k) => {
9
+ res.push(`${k}=${value[k]}`);
10
+ return res;
11
+ }, [])
12
+ .join('&');
13
+ }
@@ -10,7 +10,11 @@ function base64ToBlob(base64, contentType) {
10
10
  var _a;
11
11
  const [prefix, rest] = base64.split(',');
12
12
  const type = contentType !== null && contentType !== void 0 ? contentType : (_a = prefix.match(/:(.*?);/)) === null || _a === void 0 ? void 0 : _a[1];
13
- const data = window.atob(rest);
13
+ // 还是选用直接 atob
14
+ // const data = inBrowser()
15
+ // ? window.atob(rest)
16
+ // : Buffer.from(rest, 'base64').toString('binary')
17
+ const data = atob(rest);
14
18
  let len = data.length;
15
19
  const u8arr = new Uint8Array(len);
16
20
  while (len--) {
package/lib/index.d.ts CHANGED
@@ -86,6 +86,7 @@ export * from './parseError';
86
86
  export * from './parseObject';
87
87
  export * from './parsePath';
88
88
  export * from './parseQuery';
89
+ export * from './parseQueryString';
89
90
  export * from './pascalCase';
90
91
  export * from './pick';
91
92
  export * from './replaceCrlf';
@@ -99,6 +100,7 @@ export * from './splitArray';
99
100
  export * from './storage';
100
101
  export * from './stringTrim';
101
102
  export * from './stringifyQuery';
103
+ export * from './stringifyQueryString';
102
104
  export * from './throttle';
103
105
  export * from './toCDB';
104
106
  export * from './toDBC';
package/lib/index.js CHANGED
@@ -103,6 +103,7 @@ __exportStar(require("./parseError"), exports);
103
103
  __exportStar(require("./parseObject"), exports);
104
104
  __exportStar(require("./parsePath"), exports);
105
105
  __exportStar(require("./parseQuery"), exports);
106
+ __exportStar(require("./parseQueryString"), exports);
106
107
  __exportStar(require("./pascalCase"), exports);
107
108
  __exportStar(require("./pick"), exports);
108
109
  __exportStar(require("./replaceCrlf"), exports);
@@ -116,6 +117,7 @@ __exportStar(require("./splitArray"), exports);
116
117
  __exportStar(require("./storage"), exports);
117
118
  __exportStar(require("./stringTrim"), exports);
118
119
  __exportStar(require("./stringifyQuery"), exports);
120
+ __exportStar(require("./stringifyQueryString"), exports);
119
121
  __exportStar(require("./throttle"), exports);
120
122
  __exportStar(require("./toCDB"), exports);
121
123
  __exportStar(require("./toDBC"), exports);
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 解析 url 参数
3
+ *
4
+ * 在不支持 URLSearchParams 的环境下使用该方法
5
+ */
6
+ export declare function parseQueryString<T extends Record<string, any>>(value: string): T;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseQueryString = void 0;
4
+ /**
5
+ * 解析 url 参数
6
+ *
7
+ * 在不支持 URLSearchParams 的环境下使用该方法
8
+ */
9
+ function parseQueryString(value) {
10
+ return decodeURIComponent(value)
11
+ .split('&')
12
+ .reduce((res, item) => {
13
+ const [key, value] = item.split('=');
14
+ res[key] = value;
15
+ return res;
16
+ }, {});
17
+ }
18
+ exports.parseQueryString = parseQueryString;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 将对象转换为查询字符串
3
+ *
4
+ * 在不支持 URLSearchParams 的环境下使用该方法
5
+ */
6
+ export declare function stringifyQueryString(value: Record<string, any>): string;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stringifyQueryString = void 0;
4
+ /**
5
+ * 将对象转换为查询字符串
6
+ *
7
+ * 在不支持 URLSearchParams 的环境下使用该方法
8
+ */
9
+ function stringifyQueryString(value) {
10
+ return Object.keys(value)
11
+ .reduce((res, k) => {
12
+ res.push(`${k}=${value[k]}`);
13
+ return res;
14
+ }, [])
15
+ .join('&');
16
+ }
17
+ exports.stringifyQueryString = stringifyQueryString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daysnap/utils",
3
- "version": "0.0.84",
3
+ "version": "0.0.86",
4
4
  "description": "通用的工具库",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",