@daysnap/utils 0.0.87 → 0.0.88

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/69a123e/src/storage/factory.ts#L3)
38
+ [storage/factory.ts:3](https://github.com/daysnap/utils/blob/721f4a9/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/69a123e/src/storage/factory.ts#L4)
52
+ [storage/factory.ts:4](https://github.com/daysnap/utils/blob/721f4a9/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/69a123e/src/storage/factory.ts#L2)
72
+ [storage/factory.ts:2](https://github.com/daysnap/utils/blob/721f4a9/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/69a123e/src/storage/factory.ts#L5)
92
+ [storage/factory.ts:5](https://github.com/daysnap/utils/blob/721f4a9/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/69a123e/src/trap.ts#L12)
34
+ [trap.ts:12](https://github.com/daysnap/utils/blob/721f4a9/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/69a123e/src/trap.ts#L10)
59
+ [trap.ts:10](https://github.com/daysnap/utils/blob/721f4a9/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/69a123e/src/trap.ts#L11)
83
+ [trap.ts:11](https://github.com/daysnap/utils/blob/721f4a9/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/69a123e/src/trap.ts#L8)
93
+ [trap.ts:8](https://github.com/daysnap/utils/blob/721f4a9/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/69a123e/src/trap.ts#L9)
118
+ [trap.ts:9](https://github.com/daysnap/utils/blob/721f4a9/src/trap.ts#L9)
package/docs/modules.md CHANGED
@@ -16,8 +16,10 @@
16
16
  ### Functions
17
17
 
18
18
  - [ato](modules.md#ato)
19
+ - [atob](modules.md#atob)
19
20
  - [base64ToBlob](modules.md#base64toblob)
20
21
  - [blobToBase64](modules.md#blobtobase64)
22
+ - [btoa](modules.md#btoa)
21
23
  - [cached](modules.md#cached)
22
24
  - [camelCase](modules.md#camelcase)
23
25
  - [canvasToBlob](modules.md#canvastoblob)
@@ -138,7 +140,7 @@
138
140
 
139
141
  #### Defined in
140
142
 
141
- [trap.ts:15](https://github.com/daysnap/utils/blob/69a123e/src/trap.ts#L15)
143
+ [trap.ts:15](https://github.com/daysnap/utils/blob/721f4a9/src/trap.ts#L15)
142
144
 
143
145
  ## Functions
144
146
 
@@ -176,7 +178,7 @@ res = { '1': '男', '2': '女' }
176
178
 
177
179
  #### Defined in
178
180
 
179
- [ato.ts:12](https://github.com/daysnap/utils/blob/69a123e/src/ato.ts#L12)
181
+ [ato.ts:12](https://github.com/daysnap/utils/blob/721f4a9/src/ato.ts#L12)
180
182
 
181
183
  ▸ **ato**<`T`, `K`\>(`options`, `labelKey`, `valueKey`): `Record`<`T`[`K`], `any`\>
182
184
 
@@ -201,7 +203,27 @@ res = { '1': '男', '2': '女' }
201
203
 
202
204
  #### Defined in
203
205
 
204
- [ato.ts:16](https://github.com/daysnap/utils/blob/69a123e/src/ato.ts#L16)
206
+ [ato.ts:16](https://github.com/daysnap/utils/blob/721f4a9/src/ato.ts#L16)
207
+
208
+ ___
209
+
210
+ ### atob
211
+
212
+ ▸ **atob**(`string`): `string`
213
+
214
+ #### Parameters
215
+
216
+ | Name | Type |
217
+ | :------ | :------ |
218
+ | `string` | `string` |
219
+
220
+ #### Returns
221
+
222
+ `string`
223
+
224
+ #### Defined in
225
+
226
+ decode.ts:41
205
227
 
206
228
  ___
207
229
 
@@ -224,7 +246,7 @@ base64 转 blob
224
246
 
225
247
  #### Defined in
226
248
 
227
- [base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/base64ToBlob.ts#L6)
249
+ [base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/base64ToBlob.ts#L6)
228
250
 
229
251
  ___
230
252
 
@@ -246,7 +268,27 @@ blob 转 base64
246
268
 
247
269
  #### Defined in
248
270
 
249
- [blobToBase64.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/blobToBase64.ts#L4)
271
+ [blobToBase64.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/blobToBase64.ts#L4)
272
+
273
+ ___
274
+
275
+ ### btoa
276
+
277
+ ▸ **btoa**(`string`): `string`
278
+
279
+ #### Parameters
280
+
281
+ | Name | Type |
282
+ | :------ | :------ |
283
+ | `string` | `string` |
284
+
285
+ #### Returns
286
+
287
+ `string`
288
+
289
+ #### Defined in
290
+
291
+ decode.ts:8
250
292
 
251
293
  ___
252
294
 
@@ -287,7 +329,7 @@ ___
287
329
 
288
330
  #### Defined in
289
331
 
290
- [cached.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/cached.ts#L5)
332
+ [cached.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/cached.ts#L5)
291
333
 
292
334
  ___
293
335
 
@@ -310,7 +352,7 @@ camelCase('hello-world') => helloWorld
310
352
 
311
353
  #### Defined in
312
354
 
313
- [camelCase.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/camelCase.ts#L5)
355
+ [camelCase.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/camelCase.ts#L5)
314
356
 
315
357
  ___
316
358
 
@@ -334,7 +376,7 @@ canvas 转 blob 文件
334
376
 
335
377
  #### Defined in
336
378
 
337
- [canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/canvasToBlob.ts#L4)
379
+ [canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/canvasToBlob.ts#L4)
338
380
 
339
381
  ___
340
382
 
@@ -357,7 +399,7 @@ capitalize('hello world') => Hello world
357
399
 
358
400
  #### Defined in
359
401
 
360
- [capitalize.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/capitalize.ts#L5)
402
+ [capitalize.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/capitalize.ts#L5)
361
403
 
362
404
  ___
363
405
 
@@ -381,7 +423,7 @@ ___
381
423
 
382
424
  #### Defined in
383
425
 
384
- [clamp.ts:7](https://github.com/daysnap/utils/blob/69a123e/src/clamp.ts#L7)
426
+ [clamp.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/clamp.ts#L7)
385
427
 
386
428
  ___
387
429
 
@@ -409,7 +451,7 @@ ___
409
451
 
410
452
  #### Defined in
411
453
 
412
- [clone.ts:8](https://github.com/daysnap/utils/blob/69a123e/src/clone.ts#L8)
454
+ [clone.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/clone.ts#L8)
413
455
 
414
456
  ___
415
457
 
@@ -437,7 +479,7 @@ ___
437
479
 
438
480
  #### Defined in
439
481
 
440
- [cloneSimple.ts:7](https://github.com/daysnap/utils/blob/69a123e/src/cloneSimple.ts#L7)
482
+ [cloneSimple.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/cloneSimple.ts#L7)
441
483
 
442
484
  ___
443
485
 
@@ -459,7 +501,7 @@ ___
459
501
 
460
502
  #### Defined in
461
503
 
462
- [createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/createHexColorByHash.ts#L4)
504
+ [createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/createHexColorByHash.ts#L4)
463
505
 
464
506
  ___
465
507
 
@@ -485,7 +527,7 @@ ___
485
527
 
486
528
  #### Defined in
487
529
 
488
- [compareVersion.ts:9](https://github.com/daysnap/utils/blob/69a123e/src/compareVersion.ts#L9)
530
+ [compareVersion.ts:9](https://github.com/daysnap/utils/blob/721f4a9/src/compareVersion.ts#L9)
489
531
 
490
532
  ___
491
533
 
@@ -507,7 +549,7 @@ ___
507
549
 
508
550
  #### Defined in
509
551
 
510
- [compressImage.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/compressImage.ts#L6)
552
+ [compressImage.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/compressImage.ts#L6)
511
553
 
512
554
  ___
513
555
 
@@ -545,7 +587,7 @@ ___
545
587
 
546
588
  #### Defined in
547
589
 
548
- [createLinearFunction.ts:9](https://github.com/daysnap/utils/blob/69a123e/src/createLinearFunction.ts#L9)
590
+ [createLinearFunction.ts:9](https://github.com/daysnap/utils/blob/721f4a9/src/createLinearFunction.ts#L9)
549
591
 
550
592
  ___
551
593
 
@@ -577,7 +619,7 @@ ___
577
619
 
578
620
  #### Defined in
579
621
 
580
- [trap.ts:49](https://github.com/daysnap/utils/blob/69a123e/src/trap.ts#L49)
622
+ [trap.ts:49](https://github.com/daysnap/utils/blob/721f4a9/src/trap.ts#L49)
581
623
 
582
624
  ___
583
625
 
@@ -640,7 +682,7 @@ fn() 执行的时候就会执行showLoading
640
682
 
641
683
  #### Defined in
642
684
 
643
- [createWithLoading.ts:9](https://github.com/daysnap/utils/blob/69a123e/src/createWithLoading.ts#L9)
685
+ [createWithLoading.ts:9](https://github.com/daysnap/utils/blob/721f4a9/src/createWithLoading.ts#L9)
644
686
 
645
687
  ___
646
688
 
@@ -683,7 +725,7 @@ ___
683
725
 
684
726
  #### Defined in
685
727
 
686
- [debounce.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/debounce.ts#L5)
728
+ [debounce.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/debounce.ts#L5)
687
729
 
688
730
  ___
689
731
 
@@ -707,7 +749,7 @@ ___
707
749
 
708
750
  #### Defined in
709
751
 
710
- [downloadFile.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/downloadFile.ts#L4)
752
+ [downloadFile.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/downloadFile.ts#L4)
711
753
 
712
754
  ___
713
755
 
@@ -736,7 +778,7 @@ ___
736
778
 
737
779
  #### Defined in
738
780
 
739
- [each.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/each.ts#L4)
781
+ [each.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/each.ts#L4)
740
782
 
741
783
  ▸ **each**<`T`\>(`data`, `callback`): `void`
742
784
 
@@ -759,7 +801,7 @@ ___
759
801
 
760
802
  #### Defined in
761
803
 
762
- [each.ts:8](https://github.com/daysnap/utils/blob/69a123e/src/each.ts#L8)
804
+ [each.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/each.ts#L8)
763
805
 
764
806
  ___
765
807
 
@@ -777,7 +819,7 @@ ___
777
819
 
778
820
  #### Defined in
779
821
 
780
- [exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/exitFullscreen.ts#L6)
822
+ [exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/exitFullscreen.ts#L6)
781
823
 
782
824
  ___
783
825
 
@@ -806,7 +848,7 @@ ___
806
848
 
807
849
  #### Defined in
808
850
 
809
- [storage/factory.ts:8](https://github.com/daysnap/utils/blob/69a123e/src/storage/factory.ts#L8)
851
+ [storage/factory.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/storage/factory.ts#L8)
810
852
 
811
853
  ___
812
854
 
@@ -828,7 +870,7 @@ ___
828
870
 
829
871
  #### Defined in
830
872
 
831
- [filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/filterBankCardNo.ts#L4)
873
+ [filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/filterBankCardNo.ts#L4)
832
874
 
833
875
  ___
834
876
 
@@ -850,7 +892,7 @@ ___
850
892
 
851
893
  #### Defined in
852
894
 
853
- [filterCRLF.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/filterCRLF.ts#L4)
895
+ [filterCRLF.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/filterCRLF.ts#L4)
854
896
 
855
897
  ___
856
898
 
@@ -872,7 +914,7 @@ ___
872
914
 
873
915
  #### Defined in
874
916
 
875
- [filterEmoji.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/filterEmoji.ts#L4)
917
+ [filterEmoji.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/filterEmoji.ts#L4)
876
918
 
877
919
  ___
878
920
 
@@ -895,7 +937,7 @@ ___
895
937
 
896
938
  #### Defined in
897
939
 
898
- [filterEmptyValue.ts:12](https://github.com/daysnap/utils/blob/69a123e/src/filterEmptyValue.ts#L12)
940
+ [filterEmptyValue.ts:12](https://github.com/daysnap/utils/blob/721f4a9/src/filterEmptyValue.ts#L12)
899
941
 
900
942
  ___
901
943
 
@@ -918,7 +960,7 @@ ___
918
960
 
919
961
  #### Defined in
920
962
 
921
- [filterIdCard.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/filterIdCard.ts#L5)
963
+ [filterIdCard.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/filterIdCard.ts#L5)
922
964
 
923
965
  ___
924
966
 
@@ -940,7 +982,7 @@ ___
940
982
 
941
983
  #### Defined in
942
984
 
943
- [filterName.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/filterName.ts#L4)
985
+ [filterName.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/filterName.ts#L4)
944
986
 
945
987
  ___
946
988
 
@@ -965,7 +1007,7 @@ filterPhone('13177778888', ' ') => 131 **** 8888
965
1007
 
966
1008
  #### Defined in
967
1009
 
968
- [filterPhone.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/filterPhone.ts#L6)
1010
+ [filterPhone.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/filterPhone.ts#L6)
969
1011
 
970
1012
  ___
971
1013
 
@@ -992,7 +1034,7 @@ str = '131****8888'
992
1034
 
993
1035
  #### Defined in
994
1036
 
995
- [filterString.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/filterString.ts#L6)
1037
+ [filterString.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/filterString.ts#L6)
996
1038
 
997
1039
  ___
998
1040
 
@@ -1015,7 +1057,7 @@ ___
1015
1057
 
1016
1058
  #### Defined in
1017
1059
 
1018
- [formatAmount.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/formatAmount.ts#L4)
1060
+ [formatAmount.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/formatAmount.ts#L4)
1019
1061
 
1020
1062
  ___
1021
1063
 
@@ -1039,7 +1081,7 @@ ___
1039
1081
 
1040
1082
  #### Defined in
1041
1083
 
1042
- [formatDate.ts:8](https://github.com/daysnap/utils/blob/69a123e/src/formatDate.ts#L8)
1084
+ [formatDate.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/formatDate.ts#L8)
1043
1085
 
1044
1086
  ___
1045
1087
 
@@ -1062,7 +1104,7 @@ fix iOS 日期时间格式如果是 - 就会报错的问题
1062
1104
 
1063
1105
  #### Defined in
1064
1106
 
1065
- [formatDateStr.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/formatDateStr.ts#L5)
1107
+ [formatDateStr.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/formatDateStr.ts#L5)
1066
1108
 
1067
1109
  ___
1068
1110
 
@@ -1082,7 +1124,7 @@ ___
1082
1124
 
1083
1125
  #### Defined in
1084
1126
 
1085
- [formartDateToZN.ts:3](https://github.com/daysnap/utils/blob/69a123e/src/formartDateToZN.ts#L3)
1127
+ [formartDateToZN.ts:3](https://github.com/daysnap/utils/blob/721f4a9/src/formartDateToZN.ts#L3)
1086
1128
 
1087
1129
  ___
1088
1130
 
@@ -1107,7 +1149,7 @@ formatMessage({ a: '123', b: { ba: '456' } }, ['b.ba']) => '456'
1107
1149
 
1108
1150
  #### Defined in
1109
1151
 
1110
- [formatMessage.ts:11](https://github.com/daysnap/utils/blob/69a123e/src/formatMessage.ts#L11)
1152
+ [formatMessage.ts:11](https://github.com/daysnap/utils/blob/721f4a9/src/formatMessage.ts#L11)
1111
1153
 
1112
1154
  ___
1113
1155
 
@@ -1139,7 +1181,7 @@ rest = { xxx: 1 }
1139
1181
 
1140
1182
  #### Defined in
1141
1183
 
1142
- [formatPathParams.ts:8](https://github.com/daysnap/utils/blob/69a123e/src/formatPathParams.ts#L8)
1184
+ [formatPathParams.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/formatPathParams.ts#L8)
1143
1185
 
1144
1186
  ___
1145
1187
 
@@ -1161,7 +1203,7 @@ ___
1161
1203
 
1162
1204
  #### Defined in
1163
1205
 
1164
- [getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/getBlobByUrl.ts#L4)
1206
+ [getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/getBlobByUrl.ts#L4)
1165
1207
 
1166
1208
  ___
1167
1209
 
@@ -1184,7 +1226,7 @@ ___
1184
1226
 
1185
1227
  #### Defined in
1186
1228
 
1187
- [storage/index.ts:9](https://github.com/daysnap/utils/blob/69a123e/src/storage/index.ts#L9)
1229
+ [storage/index.ts:9](https://github.com/daysnap/utils/blob/721f4a9/src/storage/index.ts#L9)
1188
1230
 
1189
1231
  ___
1190
1232
 
@@ -1206,7 +1248,7 @@ ___
1206
1248
 
1207
1249
  #### Defined in
1208
1250
 
1209
- [getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/getDayMillisecond.ts#L4)
1251
+ [getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/getDayMillisecond.ts#L4)
1210
1252
 
1211
1253
  ___
1212
1254
 
@@ -1228,7 +1270,7 @@ ___
1228
1270
 
1229
1271
  #### Defined in
1230
1272
 
1231
- [getImageInfo.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/getImageInfo.ts#L4)
1273
+ [getImageInfo.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/getImageInfo.ts#L4)
1232
1274
 
1233
1275
  ___
1234
1276
 
@@ -1251,7 +1293,7 @@ ___
1251
1293
 
1252
1294
  #### Defined in
1253
1295
 
1254
- [storage/index.ts:9](https://github.com/daysnap/utils/blob/69a123e/src/storage/index.ts#L9)
1296
+ [storage/index.ts:9](https://github.com/daysnap/utils/blob/721f4a9/src/storage/index.ts#L9)
1255
1297
 
1256
1298
  ___
1257
1299
 
@@ -1274,7 +1316,7 @@ ___
1274
1316
 
1275
1317
  #### Defined in
1276
1318
 
1277
- [getRandom.ts:7](https://github.com/daysnap/utils/blob/69a123e/src/getRandom.ts#L7)
1319
+ [getRandom.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/getRandom.ts#L7)
1278
1320
 
1279
1321
  ___
1280
1322
 
@@ -1290,7 +1332,7 @@ ___
1290
1332
 
1291
1333
  #### Defined in
1292
1334
 
1293
- [getRandomColor.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/getRandomColor.ts#L4)
1335
+ [getRandomColor.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/getRandomColor.ts#L4)
1294
1336
 
1295
1337
  ___
1296
1338
 
@@ -1312,7 +1354,7 @@ ___
1312
1354
 
1313
1355
  #### Defined in
1314
1356
 
1315
- [getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/69a123e/src/getRandomNumber.ts#L7)
1357
+ [getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/getRandomNumber.ts#L7)
1316
1358
 
1317
1359
  ___
1318
1360
 
@@ -1334,7 +1376,7 @@ ___
1334
1376
 
1335
1377
  #### Defined in
1336
1378
 
1337
- [getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/getVideoInfo.ts#L4)
1379
+ [getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/getVideoInfo.ts#L4)
1338
1380
 
1339
1381
  ___
1340
1382
 
@@ -1350,7 +1392,7 @@ ___
1350
1392
 
1351
1393
  #### Defined in
1352
1394
 
1353
- [inBrowser.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/inBrowser.ts#L4)
1395
+ [inBrowser.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/inBrowser.ts#L4)
1354
1396
 
1355
1397
  ___
1356
1398
 
@@ -1372,7 +1414,7 @@ ___
1372
1414
 
1373
1415
  #### Defined in
1374
1416
 
1375
- [insertLink.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/insertLink.ts#L4)
1417
+ [insertLink.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/insertLink.ts#L4)
1376
1418
 
1377
1419
  ▸ **insertLink**(`href`, `callback`): `void`
1378
1420
 
@@ -1389,7 +1431,7 @@ ___
1389
1431
 
1390
1432
  #### Defined in
1391
1433
 
1392
- [insertLink.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/insertLink.ts#L5)
1434
+ [insertLink.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/insertLink.ts#L5)
1393
1435
 
1394
1436
  ___
1395
1437
 
@@ -1411,7 +1453,7 @@ ___
1411
1453
 
1412
1454
  #### Defined in
1413
1455
 
1414
- [insertScript.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/insertScript.ts#L4)
1456
+ [insertScript.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/insertScript.ts#L4)
1415
1457
 
1416
1458
  ▸ **insertScript**(`src`, `callback`): `void`
1417
1459
 
@@ -1428,7 +1470,7 @@ ___
1428
1470
 
1429
1471
  #### Defined in
1430
1472
 
1431
- [insertScript.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/insertScript.ts#L5)
1473
+ [insertScript.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/insertScript.ts#L5)
1432
1474
 
1433
1475
  ___
1434
1476
 
@@ -1450,7 +1492,7 @@ ___
1450
1492
 
1451
1493
  #### Defined in
1452
1494
 
1453
- [insertStyle.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/insertStyle.ts#L4)
1495
+ [insertStyle.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/insertStyle.ts#L4)
1454
1496
 
1455
1497
  ___
1456
1498
 
@@ -1479,7 +1521,7 @@ isAmount('1.123') => false
1479
1521
 
1480
1522
  #### Defined in
1481
1523
 
1482
- [isAmount.ts:11](https://github.com/daysnap/utils/blob/69a123e/src/isAmount.ts#L11)
1524
+ [isAmount.ts:11](https://github.com/daysnap/utils/blob/721f4a9/src/isAmount.ts#L11)
1483
1525
 
1484
1526
  ___
1485
1527
 
@@ -1495,7 +1537,7 @@ ___
1495
1537
 
1496
1538
  #### Defined in
1497
1539
 
1498
- [isAndroid.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isAndroid.ts#L4)
1540
+ [isAndroid.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isAndroid.ts#L4)
1499
1541
 
1500
1542
  ___
1501
1543
 
@@ -1519,7 +1561,7 @@ val is any[]
1519
1561
 
1520
1562
  #### Defined in
1521
1563
 
1522
- [isArray.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/isArray.ts#L6)
1564
+ [isArray.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/isArray.ts#L6)
1523
1565
 
1524
1566
  ___
1525
1567
 
@@ -1541,7 +1583,7 @@ val is boolean
1541
1583
 
1542
1584
  #### Defined in
1543
1585
 
1544
- [isBoolean.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/isBoolean.ts#L5)
1586
+ [isBoolean.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isBoolean.ts#L5)
1545
1587
 
1546
1588
  ___
1547
1589
 
@@ -1563,7 +1605,7 @@ ___
1563
1605
 
1564
1606
  #### Defined in
1565
1607
 
1566
- [isChinese.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isChinese.ts#L4)
1608
+ [isChinese.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isChinese.ts#L4)
1567
1609
 
1568
1610
  ___
1569
1611
 
@@ -1585,7 +1627,7 @@ val is Date
1585
1627
 
1586
1628
  #### Defined in
1587
1629
 
1588
- [isDate.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isDate.ts#L4)
1630
+ [isDate.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isDate.ts#L4)
1589
1631
 
1590
1632
  ___
1591
1633
 
@@ -1607,7 +1649,7 @@ ___
1607
1649
 
1608
1650
  #### Defined in
1609
1651
 
1610
- [isEmail.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isEmail.ts#L4)
1652
+ [isEmail.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isEmail.ts#L4)
1611
1653
 
1612
1654
  ___
1613
1655
 
@@ -1629,7 +1671,7 @@ ___
1629
1671
 
1630
1672
  #### Defined in
1631
1673
 
1632
- [isEmpty.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/isEmpty.ts#L6)
1674
+ [isEmpty.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/isEmpty.ts#L6)
1633
1675
 
1634
1676
  ___
1635
1677
 
@@ -1651,7 +1693,7 @@ ___
1651
1693
 
1652
1694
  #### Defined in
1653
1695
 
1654
- [isEmptyArray.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/isEmptyArray.ts#L6)
1696
+ [isEmptyArray.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/isEmptyArray.ts#L6)
1655
1697
 
1656
1698
  ___
1657
1699
 
@@ -1673,7 +1715,7 @@ ___
1673
1715
 
1674
1716
  #### Defined in
1675
1717
 
1676
- [isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/isEmptyObject.ts#L5)
1718
+ [isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isEmptyObject.ts#L5)
1677
1719
 
1678
1720
  ___
1679
1721
 
@@ -1695,7 +1737,7 @@ val is Error
1695
1737
 
1696
1738
  #### Defined in
1697
1739
 
1698
- [isError.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isError.ts#L4)
1740
+ [isError.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isError.ts#L4)
1699
1741
 
1700
1742
  ___
1701
1743
 
@@ -1717,7 +1759,7 @@ val is Function
1717
1759
 
1718
1760
  #### Defined in
1719
1761
 
1720
- [isFunction.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isFunction.ts#L4)
1762
+ [isFunction.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isFunction.ts#L4)
1721
1763
 
1722
1764
  ___
1723
1765
 
@@ -1735,7 +1777,7 @@ ___
1735
1777
 
1736
1778
  #### Defined in
1737
1779
 
1738
- [isIE.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/isIE.ts#L6)
1780
+ [isIE.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/isIE.ts#L6)
1739
1781
 
1740
1782
  ___
1741
1783
 
@@ -1751,7 +1793,7 @@ ___
1751
1793
 
1752
1794
  #### Defined in
1753
1795
 
1754
- [isIOS.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isIOS.ts#L4)
1796
+ [isIOS.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isIOS.ts#L4)
1755
1797
 
1756
1798
  ___
1757
1799
 
@@ -1773,7 +1815,7 @@ ___
1773
1815
 
1774
1816
  #### Defined in
1775
1817
 
1776
- [isIdCard.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isIdCard.ts#L4)
1818
+ [isIdCard.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isIdCard.ts#L4)
1777
1819
 
1778
1820
  ___
1779
1821
 
@@ -1795,7 +1837,7 @@ ___
1795
1837
 
1796
1838
  #### Defined in
1797
1839
 
1798
- [isJSONString.ts:7](https://github.com/daysnap/utils/blob/69a123e/src/isJSONString.ts#L7)
1840
+ [isJSONString.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/isJSONString.ts#L7)
1799
1841
 
1800
1842
  ___
1801
1843
 
@@ -1817,7 +1859,7 @@ ___
1817
1859
 
1818
1860
  #### Defined in
1819
1861
 
1820
- [isLan.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/isLan.ts#L5)
1862
+ [isLan.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isLan.ts#L5)
1821
1863
 
1822
1864
  ___
1823
1865
 
@@ -1839,7 +1881,7 @@ ___
1839
1881
 
1840
1882
  #### Defined in
1841
1883
 
1842
- [isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/isLicenseCode.ts#L5)
1884
+ [isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isLicenseCode.ts#L5)
1843
1885
 
1844
1886
  ___
1845
1887
 
@@ -1855,7 +1897,7 @@ ___
1855
1897
 
1856
1898
  #### Defined in
1857
1899
 
1858
- [isMobile.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isMobile.ts#L4)
1900
+ [isMobile.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isMobile.ts#L4)
1859
1901
 
1860
1902
  ___
1861
1903
 
@@ -1878,7 +1920,7 @@ ___
1878
1920
 
1879
1921
  #### Defined in
1880
1922
 
1881
- [isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/69a123e/src/isNativeFunction.ts#L7)
1923
+ [isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/isNativeFunction.ts#L7)
1882
1924
 
1883
1925
  ___
1884
1926
 
@@ -1900,7 +1942,7 @@ val is null
1900
1942
 
1901
1943
  #### Defined in
1902
1944
 
1903
- [isNull.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isNull.ts#L4)
1945
+ [isNull.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isNull.ts#L4)
1904
1946
 
1905
1947
  ___
1906
1948
 
@@ -1922,7 +1964,7 @@ val is number
1922
1964
 
1923
1965
  #### Defined in
1924
1966
 
1925
- [isNumber.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/isNumber.ts#L5)
1967
+ [isNumber.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isNumber.ts#L5)
1926
1968
 
1927
1969
  ___
1928
1970
 
@@ -1944,7 +1986,7 @@ val is Record<string, any\>
1944
1986
 
1945
1987
  #### Defined in
1946
1988
 
1947
- [isObject.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isObject.ts#L4)
1989
+ [isObject.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isObject.ts#L4)
1948
1990
 
1949
1991
  ___
1950
1992
 
@@ -1966,7 +2008,7 @@ ___
1966
2008
 
1967
2009
  #### Defined in
1968
2010
 
1969
- [isPhone.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isPhone.ts#L4)
2011
+ [isPhone.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isPhone.ts#L4)
1970
2012
 
1971
2013
  ___
1972
2014
 
@@ -1994,7 +2036,7 @@ val is Promise<T\>
1994
2036
 
1995
2037
  #### Defined in
1996
2038
 
1997
- [isPromise.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isPromise.ts#L4)
2039
+ [isPromise.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isPromise.ts#L4)
1998
2040
 
1999
2041
  ___
2000
2042
 
@@ -2016,7 +2058,7 @@ val is RegExp
2016
2058
 
2017
2059
  #### Defined in
2018
2060
 
2019
- [isRegExp.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isRegExp.ts#L4)
2061
+ [isRegExp.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isRegExp.ts#L4)
2020
2062
 
2021
2063
  ___
2022
2064
 
@@ -2038,7 +2080,7 @@ val is string
2038
2080
 
2039
2081
  #### Defined in
2040
2082
 
2041
- [isString.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isString.ts#L4)
2083
+ [isString.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isString.ts#L4)
2042
2084
 
2043
2085
  ___
2044
2086
 
@@ -2060,7 +2102,7 @@ val is undefined
2060
2102
 
2061
2103
  #### Defined in
2062
2104
 
2063
- [isUndefined.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isUndefined.ts#L4)
2105
+ [isUndefined.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isUndefined.ts#L4)
2064
2106
 
2065
2107
  ___
2066
2108
 
@@ -2098,7 +2140,7 @@ ___
2098
2140
 
2099
2141
  #### Defined in
2100
2142
 
2101
- [isWeChat.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/isWeChat.ts#L4)
2143
+ [isWeChat.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isWeChat.ts#L4)
2102
2144
 
2103
2145
  ___
2104
2146
 
@@ -2115,7 +2157,7 @@ https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html
2115
2157
 
2116
2158
  #### Defined in
2117
2159
 
2118
- [isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/isWeChatMiniProgram.ts#L5)
2160
+ [isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isWeChatMiniProgram.ts#L5)
2119
2161
 
2120
2162
  ___
2121
2163
 
@@ -2135,7 +2177,7 @@ ___
2135
2177
 
2136
2178
  #### Defined in
2137
2179
 
2138
- [isWeChat.ts:12](https://github.com/daysnap/utils/blob/69a123e/src/isWeChat.ts#L12)
2180
+ [isWeChat.ts:12](https://github.com/daysnap/utils/blob/721f4a9/src/isWeChat.ts#L12)
2139
2181
 
2140
2182
  ___
2141
2183
 
@@ -2157,7 +2199,7 @@ val is Window
2157
2199
 
2158
2200
  #### Defined in
2159
2201
 
2160
- [isWindow.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/isWindow.ts#L5)
2202
+ [isWindow.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isWindow.ts#L5)
2161
2203
 
2162
2204
  ___
2163
2205
 
@@ -2180,7 +2222,7 @@ kebabCase('helloWorld') => hello-world
2180
2222
 
2181
2223
  #### Defined in
2182
2224
 
2183
- [kebabCase.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/kebabCase.ts#L5)
2225
+ [kebabCase.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/kebabCase.ts#L5)
2184
2226
 
2185
2227
  ___
2186
2228
 
@@ -2209,7 +2251,7 @@ list 生成器,快速生成数据
2209
2251
 
2210
2252
  #### Defined in
2211
2253
 
2212
- [listGenerator.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/listGenerator.ts#L5)
2254
+ [listGenerator.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/listGenerator.ts#L5)
2213
2255
 
2214
2256
  ___
2215
2257
 
@@ -2234,7 +2276,7 @@ ___
2234
2276
 
2235
2277
  #### Defined in
2236
2278
 
2237
- [mousewheel.ts:22](https://github.com/daysnap/utils/blob/69a123e/src/mousewheel.ts#L22)
2279
+ [mousewheel.ts:22](https://github.com/daysnap/utils/blob/721f4a9/src/mousewheel.ts#L22)
2238
2280
 
2239
2281
  ___
2240
2282
 
@@ -2250,7 +2292,7 @@ ___
2250
2292
 
2251
2293
  #### Defined in
2252
2294
 
2253
- [nf.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/nf.ts#L4)
2295
+ [nf.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/nf.ts#L4)
2254
2296
 
2255
2297
  ___
2256
2298
 
@@ -2272,7 +2314,7 @@ ___
2272
2314
 
2273
2315
  #### Defined in
2274
2316
 
2275
- [normalizePath.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/normalizePath.ts#L4)
2317
+ [normalizePath.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/normalizePath.ts#L4)
2276
2318
 
2277
2319
  ___
2278
2320
 
@@ -2302,7 +2344,7 @@ ___
2302
2344
 
2303
2345
  #### Defined in
2304
2346
 
2305
- [omit.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/omit.ts#L4)
2347
+ [omit.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/omit.ts#L4)
2306
2348
 
2307
2349
  ___
2308
2350
 
@@ -2326,7 +2368,7 @@ ___
2326
2368
 
2327
2369
  #### Defined in
2328
2370
 
2329
- [padding.ts:7](https://github.com/daysnap/utils/blob/69a123e/src/padding.ts#L7)
2371
+ [padding.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/padding.ts#L7)
2330
2372
 
2331
2373
  ___
2332
2374
 
@@ -2348,7 +2390,7 @@ ___
2348
2390
 
2349
2391
  #### Defined in
2350
2392
 
2351
- [parseDate.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/parseDate.ts#L4)
2393
+ [parseDate.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/parseDate.ts#L4)
2352
2394
 
2353
2395
  ___
2354
2396
 
@@ -2371,7 +2413,7 @@ ___
2371
2413
 
2372
2414
  #### Defined in
2373
2415
 
2374
- [parseError.ts:8](https://github.com/daysnap/utils/blob/69a123e/src/parseError.ts#L8)
2416
+ [parseError.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/parseError.ts#L8)
2375
2417
 
2376
2418
  ___
2377
2419
 
@@ -2401,7 +2443,7 @@ parseObject('a.b.c', 1) => { a: { b: { c: 1 } } }
2401
2443
 
2402
2444
  #### Defined in
2403
2445
 
2404
- [parseObject.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/parseObject.ts#L5)
2446
+ [parseObject.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/parseObject.ts#L5)
2405
2447
 
2406
2448
  ___
2407
2449
 
@@ -2430,7 +2472,7 @@ ___
2430
2472
 
2431
2473
  #### Defined in
2432
2474
 
2433
- [parsePath.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/parsePath.ts#L6)
2475
+ [parsePath.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/parsePath.ts#L6)
2434
2476
 
2435
2477
  ___
2436
2478
 
@@ -2453,7 +2495,7 @@ ___
2453
2495
 
2454
2496
  #### Defined in
2455
2497
 
2456
- [parseQuery.ts:8](https://github.com/daysnap/utils/blob/69a123e/src/parseQuery.ts#L8)
2498
+ [parseQuery.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/parseQuery.ts#L8)
2457
2499
 
2458
2500
  ___
2459
2501
 
@@ -2483,7 +2525,7 @@ ___
2483
2525
 
2484
2526
  #### Defined in
2485
2527
 
2486
- [parseQueryString.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/parseQueryString.ts#L6)
2528
+ [parseQueryString.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/parseQueryString.ts#L6)
2487
2529
 
2488
2530
  ___
2489
2531
 
@@ -2506,7 +2548,7 @@ pascalCase('hello-world') => HelloWorld
2506
2548
 
2507
2549
  #### Defined in
2508
2550
 
2509
- [pascalCase.ts:8](https://github.com/daysnap/utils/blob/69a123e/src/pascalCase.ts#L8)
2551
+ [pascalCase.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/pascalCase.ts#L8)
2510
2552
 
2511
2553
  ___
2512
2554
 
@@ -2536,7 +2578,7 @@ ___
2536
2578
 
2537
2579
  #### Defined in
2538
2580
 
2539
- [pick.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/pick.ts#L4)
2581
+ [pick.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/pick.ts#L4)
2540
2582
 
2541
2583
  ___
2542
2584
 
@@ -2559,7 +2601,7 @@ ___
2559
2601
 
2560
2602
  #### Defined in
2561
2603
 
2562
- [replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/replaceCrlf.ts#L4)
2604
+ [replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/replaceCrlf.ts#L4)
2563
2605
 
2564
2606
  ___
2565
2607
 
@@ -2583,7 +2625,7 @@ ___
2583
2625
 
2584
2626
  #### Defined in
2585
2627
 
2586
- [requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/requestFullScreen.ts#L6)
2628
+ [requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/requestFullScreen.ts#L6)
2587
2629
 
2588
2630
  ___
2589
2631
 
@@ -2609,7 +2651,7 @@ reserve(0, '--') => 0
2609
2651
 
2610
2652
  #### Defined in
2611
2653
 
2612
- [reserve.ts:8](https://github.com/daysnap/utils/blob/69a123e/src/reserve.ts#L8)
2654
+ [reserve.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/reserve.ts#L8)
2613
2655
 
2614
2656
  ___
2615
2657
 
@@ -2633,7 +2675,7 @@ ___
2633
2675
 
2634
2676
  #### Defined in
2635
2677
 
2636
- [rgbToHex.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/rgbToHex.ts#L4)
2678
+ [rgbToHex.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/rgbToHex.ts#L4)
2637
2679
 
2638
2680
  ___
2639
2681
 
@@ -2656,7 +2698,7 @@ ___
2656
2698
 
2657
2699
  #### Defined in
2658
2700
 
2659
- [round.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/round.ts#L6)
2701
+ [round.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/round.ts#L6)
2660
2702
 
2661
2703
  ___
2662
2704
 
@@ -2672,7 +2714,7 @@ ___
2672
2714
 
2673
2715
  #### Defined in
2674
2716
 
2675
- [scrollToTop.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/scrollToTop.ts#L4)
2717
+ [scrollToTop.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/scrollToTop.ts#L4)
2676
2718
 
2677
2719
  ___
2678
2720
 
@@ -2695,7 +2737,7 @@ ___
2695
2737
 
2696
2738
  #### Defined in
2697
2739
 
2698
- [sleep.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/sleep.ts#L6)
2740
+ [sleep.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/sleep.ts#L6)
2699
2741
 
2700
2742
  ___
2701
2743
 
@@ -2724,7 +2766,7 @@ ___
2724
2766
 
2725
2767
  #### Defined in
2726
2768
 
2727
- [splitArray.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/splitArray.ts#L4)
2769
+ [splitArray.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/splitArray.ts#L4)
2728
2770
 
2729
2771
  ___
2730
2772
 
@@ -2747,7 +2789,7 @@ ___
2747
2789
 
2748
2790
  #### Defined in
2749
2791
 
2750
- [stringTrim.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/stringTrim.ts#L6)
2792
+ [stringTrim.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/stringTrim.ts#L6)
2751
2793
 
2752
2794
  ___
2753
2795
 
@@ -2769,7 +2811,7 @@ ___
2769
2811
 
2770
2812
  #### Defined in
2771
2813
 
2772
- [stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/69a123e/src/stringifyQuery.ts#L7)
2814
+ [stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/stringifyQuery.ts#L7)
2773
2815
 
2774
2816
  ___
2775
2817
 
@@ -2793,7 +2835,7 @@ ___
2793
2835
 
2794
2836
  #### Defined in
2795
2837
 
2796
- [stringifyQueryString.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/stringifyQueryString.ts#L6)
2838
+ [stringifyQueryString.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/stringifyQueryString.ts#L6)
2797
2839
 
2798
2840
  ___
2799
2841
 
@@ -2837,7 +2879,7 @@ ___
2837
2879
 
2838
2880
  #### Defined in
2839
2881
 
2840
- [throttle.ts:48](https://github.com/daysnap/utils/blob/69a123e/src/throttle.ts#L48)
2882
+ [throttle.ts:48](https://github.com/daysnap/utils/blob/721f4a9/src/throttle.ts#L48)
2841
2883
 
2842
2884
  ___
2843
2885
 
@@ -2880,7 +2922,7 @@ ___
2880
2922
 
2881
2923
  #### Defined in
2882
2924
 
2883
- [throttle.ts:5](https://github.com/daysnap/utils/blob/69a123e/src/throttle.ts#L5)
2925
+ [throttle.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/throttle.ts#L5)
2884
2926
 
2885
2927
  ___
2886
2928
 
@@ -2923,7 +2965,7 @@ ___
2923
2965
 
2924
2966
  #### Defined in
2925
2967
 
2926
- [throttle.ts:25](https://github.com/daysnap/utils/blob/69a123e/src/throttle.ts#L25)
2968
+ [throttle.ts:25](https://github.com/daysnap/utils/blob/721f4a9/src/throttle.ts#L25)
2927
2969
 
2928
2970
  ___
2929
2971
 
@@ -2945,7 +2987,7 @@ ___
2945
2987
 
2946
2988
  #### Defined in
2947
2989
 
2948
- [toCDB.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/toCDB.ts#L4)
2990
+ [toCDB.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/toCDB.ts#L4)
2949
2991
 
2950
2992
  ___
2951
2993
 
@@ -2967,7 +3009,7 @@ ___
2967
3009
 
2968
3010
  #### Defined in
2969
3011
 
2970
- [toDBC.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/toDBC.ts#L4)
3012
+ [toDBC.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/toDBC.ts#L4)
2971
3013
 
2972
3014
  ___
2973
3015
 
@@ -2991,7 +3033,7 @@ ___
2991
3033
 
2992
3034
  #### Defined in
2993
3035
 
2994
- [typeOf.ts:6](https://github.com/daysnap/utils/blob/69a123e/src/typeOf.ts#L6)
3036
+ [typeOf.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/typeOf.ts#L6)
2995
3037
 
2996
3038
  ___
2997
3039
 
@@ -3020,4 +3062,4 @@ ___
3020
3062
 
3021
3063
  #### Defined in
3022
3064
 
3023
- [withPreventConsecutiveClicks.ts:4](https://github.com/daysnap/utils/blob/69a123e/src/withPreventConsecutiveClicks.ts#L4)
3065
+ [withPreventConsecutiveClicks.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/withPreventConsecutiveClicks.ts#L4)
package/es/decode.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare const btoa: (string: string) => string;
2
+ export declare const atob: (string: string) => string;
package/es/decode.js ADDED
@@ -0,0 +1,47 @@
1
+ // weapp jwt-decode
2
+ const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
3
+ const b64re =
4
+ // eslint-disable-next-line no-useless-escape
5
+ /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
6
+ // btoa
7
+ export const btoa = function (string) {
8
+ string = String(string);
9
+ let bitmap, a, b, c, result = '', i = 0,
10
+ // eslint-disable-next-line prefer-const
11
+ rest = string.length % 3;
12
+ for (; i < string.length;) {
13
+ if ((a = string.charCodeAt(i++)) > 255 ||
14
+ (b = string.charCodeAt(i++)) > 255 ||
15
+ (c = string.charCodeAt(i++)) > 255)
16
+ throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");
17
+ bitmap = (a << 16) | (b << 8) | c;
18
+ result +=
19
+ b64.charAt((bitmap >> 18) & 63) +
20
+ b64.charAt((bitmap >> 12) & 63) +
21
+ b64.charAt((bitmap >> 6) & 63) +
22
+ b64.charAt(bitmap & 63);
23
+ }
24
+ return rest ? result.slice(0, rest - 3) + '==='.substring(rest) : result;
25
+ };
26
+ // atob
27
+ export const atob = function (string) {
28
+ string = String(string).replace(/[\t\n\f\r ]+/g, '');
29
+ if (!b64re.test(string))
30
+ throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
31
+ string += '=='.slice(2 - (string.length & 3));
32
+ let bitmap, result = '', r1, r2, i = 0;
33
+ for (; i < string.length;) {
34
+ bitmap =
35
+ (b64.indexOf(string.charAt(i++)) << 18) |
36
+ (b64.indexOf(string.charAt(i++)) << 12) |
37
+ ((r1 = b64.indexOf(string.charAt(i++))) << 6) |
38
+ (r2 = b64.indexOf(string.charAt(i++)));
39
+ result +=
40
+ r1 === 64
41
+ ? String.fromCharCode((bitmap >> 16) & 255)
42
+ : r2 === 64
43
+ ? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)
44
+ : String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);
45
+ }
46
+ return result;
47
+ };
package/es/index.d.ts CHANGED
@@ -14,6 +14,7 @@ export * from './createHexColorByHash';
14
14
  export * from './createLinearFunction';
15
15
  export * from './createWithLoading';
16
16
  export * from './debounce';
17
+ export * from './decode';
17
18
  export * from './downloadFile';
18
19
  export * from './each';
19
20
  export * from './exitFullscreen';
package/es/index.js CHANGED
@@ -15,6 +15,7 @@ export * from './createHexColorByHash';
15
15
  export * from './createLinearFunction';
16
16
  export * from './createWithLoading';
17
17
  export * from './debounce';
18
+ export * from './decode';
18
19
  export * from './downloadFile';
19
20
  export * from './each';
20
21
  export * from './exitFullscreen';
@@ -0,0 +1,2 @@
1
+ export declare const btoa: (string: string) => string;
2
+ export declare const atob: (string: string) => string;
package/lib/decode.js ADDED
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.atob = exports.btoa = void 0;
4
+ // weapp jwt-decode
5
+ const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
6
+ const b64re =
7
+ // eslint-disable-next-line no-useless-escape
8
+ /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
9
+ // btoa
10
+ const btoa = function (string) {
11
+ string = String(string);
12
+ let bitmap, a, b, c, result = '', i = 0,
13
+ // eslint-disable-next-line prefer-const
14
+ rest = string.length % 3;
15
+ for (; i < string.length;) {
16
+ if ((a = string.charCodeAt(i++)) > 255 ||
17
+ (b = string.charCodeAt(i++)) > 255 ||
18
+ (c = string.charCodeAt(i++)) > 255)
19
+ throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");
20
+ bitmap = (a << 16) | (b << 8) | c;
21
+ result +=
22
+ b64.charAt((bitmap >> 18) & 63) +
23
+ b64.charAt((bitmap >> 12) & 63) +
24
+ b64.charAt((bitmap >> 6) & 63) +
25
+ b64.charAt(bitmap & 63);
26
+ }
27
+ return rest ? result.slice(0, rest - 3) + '==='.substring(rest) : result;
28
+ };
29
+ exports.btoa = btoa;
30
+ // atob
31
+ const atob = function (string) {
32
+ string = String(string).replace(/[\t\n\f\r ]+/g, '');
33
+ if (!b64re.test(string))
34
+ throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
35
+ string += '=='.slice(2 - (string.length & 3));
36
+ let bitmap, result = '', r1, r2, i = 0;
37
+ for (; i < string.length;) {
38
+ bitmap =
39
+ (b64.indexOf(string.charAt(i++)) << 18) |
40
+ (b64.indexOf(string.charAt(i++)) << 12) |
41
+ ((r1 = b64.indexOf(string.charAt(i++))) << 6) |
42
+ (r2 = b64.indexOf(string.charAt(i++)));
43
+ result +=
44
+ r1 === 64
45
+ ? String.fromCharCode((bitmap >> 16) & 255)
46
+ : r2 === 64
47
+ ? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)
48
+ : String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);
49
+ }
50
+ return result;
51
+ };
52
+ exports.atob = atob;
package/lib/index.d.ts CHANGED
@@ -14,6 +14,7 @@ export * from './createHexColorByHash';
14
14
  export * from './createLinearFunction';
15
15
  export * from './createWithLoading';
16
16
  export * from './debounce';
17
+ export * from './decode';
17
18
  export * from './downloadFile';
18
19
  export * from './each';
19
20
  export * from './exitFullscreen';
package/lib/index.js CHANGED
@@ -31,6 +31,7 @@ __exportStar(require("./createHexColorByHash"), exports);
31
31
  __exportStar(require("./createLinearFunction"), exports);
32
32
  __exportStar(require("./createWithLoading"), exports);
33
33
  __exportStar(require("./debounce"), exports);
34
+ __exportStar(require("./decode"), exports);
34
35
  __exportStar(require("./downloadFile"), exports);
35
36
  __exportStar(require("./each"), exports);
36
37
  __exportStar(require("./exitFullscreen"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daysnap/utils",
3
- "version": "0.0.87",
3
+ "version": "0.0.88",
4
4
  "description": "通用的工具库",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",