@daysnap/utils 0.0.92 → 0.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/interfaces/StorageManager.md +4 -4
- package/docs/interfaces/Trap.md +5 -5
- package/docs/modules.md +122 -122
- package/es/storage/factory.js +9 -1
- package/lib/storage/factory.js +9 -1
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
#### Defined in
|
|
37
37
|
|
|
38
|
-
[storage/factory.ts:
|
|
38
|
+
[storage/factory.ts:6](https://github.com/daysnap/utils/blob/a716607/src/storage/factory.ts#L6)
|
|
39
39
|
|
|
40
40
|
___
|
|
41
41
|
|
|
@@ -49,7 +49,7 @@ ___
|
|
|
49
49
|
|
|
50
50
|
#### Defined in
|
|
51
51
|
|
|
52
|
-
[storage/factory.ts:
|
|
52
|
+
[storage/factory.ts:7](https://github.com/daysnap/utils/blob/a716607/src/storage/factory.ts#L7)
|
|
53
53
|
|
|
54
54
|
___
|
|
55
55
|
|
|
@@ -69,7 +69,7 @@ ___
|
|
|
69
69
|
|
|
70
70
|
#### Defined in
|
|
71
71
|
|
|
72
|
-
[storage/factory.ts:
|
|
72
|
+
[storage/factory.ts:5](https://github.com/daysnap/utils/blob/a716607/src/storage/factory.ts#L5)
|
|
73
73
|
|
|
74
74
|
___
|
|
75
75
|
|
|
@@ -89,4 +89,4 @@ ___
|
|
|
89
89
|
|
|
90
90
|
#### Defined in
|
|
91
91
|
|
|
92
|
-
[storage/factory.ts:
|
|
92
|
+
[storage/factory.ts:8](https://github.com/daysnap/utils/blob/a716607/src/storage/factory.ts#L8)
|
package/docs/interfaces/Trap.md
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
#### Defined in
|
|
33
33
|
|
|
34
|
-
[trap.ts:12](https://github.com/daysnap/utils/blob/
|
|
34
|
+
[trap.ts:12](https://github.com/daysnap/utils/blob/a716607/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/
|
|
59
|
+
[trap.ts:10](https://github.com/daysnap/utils/blob/a716607/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/
|
|
83
|
+
[trap.ts:11](https://github.com/daysnap/utils/blob/a716607/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/
|
|
93
|
+
[trap.ts:8](https://github.com/daysnap/utils/blob/a716607/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/
|
|
118
|
+
[trap.ts:9](https://github.com/daysnap/utils/blob/a716607/src/trap.ts#L9)
|
package/docs/modules.md
CHANGED
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
|
|
143
143
|
#### Defined in
|
|
144
144
|
|
|
145
|
-
[trap.ts:15](https://github.com/daysnap/utils/blob/
|
|
145
|
+
[trap.ts:15](https://github.com/daysnap/utils/blob/a716607/src/trap.ts#L15)
|
|
146
146
|
|
|
147
147
|
## Functions
|
|
148
148
|
|
|
@@ -180,7 +180,7 @@ res = { '1': '男', '2': '女' }
|
|
|
180
180
|
|
|
181
181
|
#### Defined in
|
|
182
182
|
|
|
183
|
-
[ato.ts:12](https://github.com/daysnap/utils/blob/
|
|
183
|
+
[ato.ts:12](https://github.com/daysnap/utils/blob/a716607/src/ato.ts#L12)
|
|
184
184
|
|
|
185
185
|
▸ **ato**<`T`, `K`\>(`options`, `labelKey`, `valueKey`): `Record`<`T`[`K`], `any`\>
|
|
186
186
|
|
|
@@ -205,7 +205,7 @@ res = { '1': '男', '2': '女' }
|
|
|
205
205
|
|
|
206
206
|
#### Defined in
|
|
207
207
|
|
|
208
|
-
[ato.ts:16](https://github.com/daysnap/utils/blob/
|
|
208
|
+
[ato.ts:16](https://github.com/daysnap/utils/blob/a716607/src/ato.ts#L16)
|
|
209
209
|
|
|
210
210
|
___
|
|
211
211
|
|
|
@@ -225,7 +225,7 @@ ___
|
|
|
225
225
|
|
|
226
226
|
#### Defined in
|
|
227
227
|
|
|
228
|
-
[decode.ts:41](https://github.com/daysnap/utils/blob/
|
|
228
|
+
[decode.ts:41](https://github.com/daysnap/utils/blob/a716607/src/decode.ts#L41)
|
|
229
229
|
|
|
230
230
|
___
|
|
231
231
|
|
|
@@ -248,7 +248,7 @@ base64 转 blob
|
|
|
248
248
|
|
|
249
249
|
#### Defined in
|
|
250
250
|
|
|
251
|
-
[base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/
|
|
251
|
+
[base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/a716607/src/base64ToBlob.ts#L6)
|
|
252
252
|
|
|
253
253
|
___
|
|
254
254
|
|
|
@@ -270,7 +270,7 @@ blob 转 base64
|
|
|
270
270
|
|
|
271
271
|
#### Defined in
|
|
272
272
|
|
|
273
|
-
[blobToBase64.ts:4](https://github.com/daysnap/utils/blob/
|
|
273
|
+
[blobToBase64.ts:4](https://github.com/daysnap/utils/blob/a716607/src/blobToBase64.ts#L4)
|
|
274
274
|
|
|
275
275
|
___
|
|
276
276
|
|
|
@@ -290,7 +290,7 @@ ___
|
|
|
290
290
|
|
|
291
291
|
#### Defined in
|
|
292
292
|
|
|
293
|
-
[decode.ts:8](https://github.com/daysnap/utils/blob/
|
|
293
|
+
[decode.ts:8](https://github.com/daysnap/utils/blob/a716607/src/decode.ts#L8)
|
|
294
294
|
|
|
295
295
|
___
|
|
296
296
|
|
|
@@ -331,7 +331,7 @@ ___
|
|
|
331
331
|
|
|
332
332
|
#### Defined in
|
|
333
333
|
|
|
334
|
-
[cached.ts:5](https://github.com/daysnap/utils/blob/
|
|
334
|
+
[cached.ts:5](https://github.com/daysnap/utils/blob/a716607/src/cached.ts#L5)
|
|
335
335
|
|
|
336
336
|
___
|
|
337
337
|
|
|
@@ -354,7 +354,7 @@ camelCase('hello-world') => helloWorld
|
|
|
354
354
|
|
|
355
355
|
#### Defined in
|
|
356
356
|
|
|
357
|
-
[camelCase.ts:5](https://github.com/daysnap/utils/blob/
|
|
357
|
+
[camelCase.ts:5](https://github.com/daysnap/utils/blob/a716607/src/camelCase.ts#L5)
|
|
358
358
|
|
|
359
359
|
___
|
|
360
360
|
|
|
@@ -378,7 +378,7 @@ canvas 转 blob 文件
|
|
|
378
378
|
|
|
379
379
|
#### Defined in
|
|
380
380
|
|
|
381
|
-
[canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/
|
|
381
|
+
[canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/a716607/src/canvasToBlob.ts#L4)
|
|
382
382
|
|
|
383
383
|
___
|
|
384
384
|
|
|
@@ -401,7 +401,7 @@ capitalize('hello world') => Hello world
|
|
|
401
401
|
|
|
402
402
|
#### Defined in
|
|
403
403
|
|
|
404
|
-
[capitalize.ts:5](https://github.com/daysnap/utils/blob/
|
|
404
|
+
[capitalize.ts:5](https://github.com/daysnap/utils/blob/a716607/src/capitalize.ts#L5)
|
|
405
405
|
|
|
406
406
|
___
|
|
407
407
|
|
|
@@ -425,7 +425,7 @@ ___
|
|
|
425
425
|
|
|
426
426
|
#### Defined in
|
|
427
427
|
|
|
428
|
-
[clamp.ts:7](https://github.com/daysnap/utils/blob/
|
|
428
|
+
[clamp.ts:7](https://github.com/daysnap/utils/blob/a716607/src/clamp.ts#L7)
|
|
429
429
|
|
|
430
430
|
___
|
|
431
431
|
|
|
@@ -453,7 +453,7 @@ ___
|
|
|
453
453
|
|
|
454
454
|
#### Defined in
|
|
455
455
|
|
|
456
|
-
[clone.ts:8](https://github.com/daysnap/utils/blob/
|
|
456
|
+
[clone.ts:8](https://github.com/daysnap/utils/blob/a716607/src/clone.ts#L8)
|
|
457
457
|
|
|
458
458
|
___
|
|
459
459
|
|
|
@@ -481,7 +481,7 @@ ___
|
|
|
481
481
|
|
|
482
482
|
#### Defined in
|
|
483
483
|
|
|
484
|
-
[cloneSimple.ts:7](https://github.com/daysnap/utils/blob/
|
|
484
|
+
[cloneSimple.ts:7](https://github.com/daysnap/utils/blob/a716607/src/cloneSimple.ts#L7)
|
|
485
485
|
|
|
486
486
|
___
|
|
487
487
|
|
|
@@ -503,7 +503,7 @@ ___
|
|
|
503
503
|
|
|
504
504
|
#### Defined in
|
|
505
505
|
|
|
506
|
-
[createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/
|
|
506
|
+
[createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/a716607/src/createHexColorByHash.ts#L4)
|
|
507
507
|
|
|
508
508
|
___
|
|
509
509
|
|
|
@@ -529,7 +529,7 @@ ___
|
|
|
529
529
|
|
|
530
530
|
#### Defined in
|
|
531
531
|
|
|
532
|
-
[compareVersion.ts:9](https://github.com/daysnap/utils/blob/
|
|
532
|
+
[compareVersion.ts:9](https://github.com/daysnap/utils/blob/a716607/src/compareVersion.ts#L9)
|
|
533
533
|
|
|
534
534
|
___
|
|
535
535
|
|
|
@@ -551,7 +551,7 @@ ___
|
|
|
551
551
|
|
|
552
552
|
#### Defined in
|
|
553
553
|
|
|
554
|
-
[compressImage.ts:6](https://github.com/daysnap/utils/blob/
|
|
554
|
+
[compressImage.ts:6](https://github.com/daysnap/utils/blob/a716607/src/compressImage.ts#L6)
|
|
555
555
|
|
|
556
556
|
___
|
|
557
557
|
|
|
@@ -589,7 +589,7 @@ ___
|
|
|
589
589
|
|
|
590
590
|
#### Defined in
|
|
591
591
|
|
|
592
|
-
[createLinearFunction.ts:9](https://github.com/daysnap/utils/blob/
|
|
592
|
+
[createLinearFunction.ts:9](https://github.com/daysnap/utils/blob/a716607/src/createLinearFunction.ts#L9)
|
|
593
593
|
|
|
594
594
|
___
|
|
595
595
|
|
|
@@ -621,7 +621,7 @@ ___
|
|
|
621
621
|
|
|
622
622
|
#### Defined in
|
|
623
623
|
|
|
624
|
-
[trap.ts:49](https://github.com/daysnap/utils/blob/
|
|
624
|
+
[trap.ts:49](https://github.com/daysnap/utils/blob/a716607/src/trap.ts#L49)
|
|
625
625
|
|
|
626
626
|
___
|
|
627
627
|
|
|
@@ -684,7 +684,7 @@ fn() 执行的时候就会执行showLoading
|
|
|
684
684
|
|
|
685
685
|
#### Defined in
|
|
686
686
|
|
|
687
|
-
[createWithLoading.ts:11](https://github.com/daysnap/utils/blob/
|
|
687
|
+
[createWithLoading.ts:11](https://github.com/daysnap/utils/blob/a716607/src/createWithLoading.ts#L11)
|
|
688
688
|
|
|
689
689
|
___
|
|
690
690
|
|
|
@@ -727,7 +727,7 @@ ___
|
|
|
727
727
|
|
|
728
728
|
#### Defined in
|
|
729
729
|
|
|
730
|
-
[debounce.ts:5](https://github.com/daysnap/utils/blob/
|
|
730
|
+
[debounce.ts:5](https://github.com/daysnap/utils/blob/a716607/src/debounce.ts#L5)
|
|
731
731
|
|
|
732
732
|
___
|
|
733
733
|
|
|
@@ -751,7 +751,7 @@ ___
|
|
|
751
751
|
|
|
752
752
|
#### Defined in
|
|
753
753
|
|
|
754
|
-
[downloadFile.ts:4](https://github.com/daysnap/utils/blob/
|
|
754
|
+
[downloadFile.ts:4](https://github.com/daysnap/utils/blob/a716607/src/downloadFile.ts#L4)
|
|
755
755
|
|
|
756
756
|
___
|
|
757
757
|
|
|
@@ -780,7 +780,7 @@ ___
|
|
|
780
780
|
|
|
781
781
|
#### Defined in
|
|
782
782
|
|
|
783
|
-
[each.ts:4](https://github.com/daysnap/utils/blob/
|
|
783
|
+
[each.ts:4](https://github.com/daysnap/utils/blob/a716607/src/each.ts#L4)
|
|
784
784
|
|
|
785
785
|
▸ **each**<`T`\>(`data`, `callback`): `void`
|
|
786
786
|
|
|
@@ -803,7 +803,7 @@ ___
|
|
|
803
803
|
|
|
804
804
|
#### Defined in
|
|
805
805
|
|
|
806
|
-
[each.ts:8](https://github.com/daysnap/utils/blob/
|
|
806
|
+
[each.ts:8](https://github.com/daysnap/utils/blob/a716607/src/each.ts#L8)
|
|
807
807
|
|
|
808
808
|
___
|
|
809
809
|
|
|
@@ -821,7 +821,7 @@ ___
|
|
|
821
821
|
|
|
822
822
|
#### Defined in
|
|
823
823
|
|
|
824
|
-
[exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/
|
|
824
|
+
[exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/a716607/src/exitFullscreen.ts#L6)
|
|
825
825
|
|
|
826
826
|
___
|
|
827
827
|
|
|
@@ -850,7 +850,7 @@ ___
|
|
|
850
850
|
|
|
851
851
|
#### Defined in
|
|
852
852
|
|
|
853
|
-
[storage/factory.ts:
|
|
853
|
+
[storage/factory.ts:11](https://github.com/daysnap/utils/blob/a716607/src/storage/factory.ts#L11)
|
|
854
854
|
|
|
855
855
|
___
|
|
856
856
|
|
|
@@ -872,7 +872,7 @@ ___
|
|
|
872
872
|
|
|
873
873
|
#### Defined in
|
|
874
874
|
|
|
875
|
-
[filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/
|
|
875
|
+
[filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/a716607/src/filterBankCardNo.ts#L4)
|
|
876
876
|
|
|
877
877
|
___
|
|
878
878
|
|
|
@@ -894,7 +894,7 @@ ___
|
|
|
894
894
|
|
|
895
895
|
#### Defined in
|
|
896
896
|
|
|
897
|
-
[filterCRLF.ts:4](https://github.com/daysnap/utils/blob/
|
|
897
|
+
[filterCRLF.ts:4](https://github.com/daysnap/utils/blob/a716607/src/filterCRLF.ts#L4)
|
|
898
898
|
|
|
899
899
|
___
|
|
900
900
|
|
|
@@ -916,7 +916,7 @@ ___
|
|
|
916
916
|
|
|
917
917
|
#### Defined in
|
|
918
918
|
|
|
919
|
-
[filterEmoji.ts:4](https://github.com/daysnap/utils/blob/
|
|
919
|
+
[filterEmoji.ts:4](https://github.com/daysnap/utils/blob/a716607/src/filterEmoji.ts#L4)
|
|
920
920
|
|
|
921
921
|
___
|
|
922
922
|
|
|
@@ -939,7 +939,7 @@ ___
|
|
|
939
939
|
|
|
940
940
|
#### Defined in
|
|
941
941
|
|
|
942
|
-
[filterEmptyValue.ts:12](https://github.com/daysnap/utils/blob/
|
|
942
|
+
[filterEmptyValue.ts:12](https://github.com/daysnap/utils/blob/a716607/src/filterEmptyValue.ts#L12)
|
|
943
943
|
|
|
944
944
|
___
|
|
945
945
|
|
|
@@ -962,7 +962,7 @@ ___
|
|
|
962
962
|
|
|
963
963
|
#### Defined in
|
|
964
964
|
|
|
965
|
-
[filterIdCard.ts:5](https://github.com/daysnap/utils/blob/
|
|
965
|
+
[filterIdCard.ts:5](https://github.com/daysnap/utils/blob/a716607/src/filterIdCard.ts#L5)
|
|
966
966
|
|
|
967
967
|
___
|
|
968
968
|
|
|
@@ -984,7 +984,7 @@ ___
|
|
|
984
984
|
|
|
985
985
|
#### Defined in
|
|
986
986
|
|
|
987
|
-
[filterName.ts:4](https://github.com/daysnap/utils/blob/
|
|
987
|
+
[filterName.ts:4](https://github.com/daysnap/utils/blob/a716607/src/filterName.ts#L4)
|
|
988
988
|
|
|
989
989
|
___
|
|
990
990
|
|
|
@@ -1009,7 +1009,7 @@ filterPhone('13177778888', ' ') => 131 **** 8888
|
|
|
1009
1009
|
|
|
1010
1010
|
#### Defined in
|
|
1011
1011
|
|
|
1012
|
-
[filterPhone.ts:6](https://github.com/daysnap/utils/blob/
|
|
1012
|
+
[filterPhone.ts:6](https://github.com/daysnap/utils/blob/a716607/src/filterPhone.ts#L6)
|
|
1013
1013
|
|
|
1014
1014
|
___
|
|
1015
1015
|
|
|
@@ -1036,7 +1036,7 @@ str = '131****8888'
|
|
|
1036
1036
|
|
|
1037
1037
|
#### Defined in
|
|
1038
1038
|
|
|
1039
|
-
[filterString.ts:6](https://github.com/daysnap/utils/blob/
|
|
1039
|
+
[filterString.ts:6](https://github.com/daysnap/utils/blob/a716607/src/filterString.ts#L6)
|
|
1040
1040
|
|
|
1041
1041
|
___
|
|
1042
1042
|
|
|
@@ -1059,7 +1059,7 @@ ___
|
|
|
1059
1059
|
|
|
1060
1060
|
#### Defined in
|
|
1061
1061
|
|
|
1062
|
-
[formatAmount.ts:4](https://github.com/daysnap/utils/blob/
|
|
1062
|
+
[formatAmount.ts:4](https://github.com/daysnap/utils/blob/a716607/src/formatAmount.ts#L4)
|
|
1063
1063
|
|
|
1064
1064
|
___
|
|
1065
1065
|
|
|
@@ -1083,7 +1083,7 @@ ___
|
|
|
1083
1083
|
|
|
1084
1084
|
#### Defined in
|
|
1085
1085
|
|
|
1086
|
-
[formatDate.ts:8](https://github.com/daysnap/utils/blob/
|
|
1086
|
+
[formatDate.ts:8](https://github.com/daysnap/utils/blob/a716607/src/formatDate.ts#L8)
|
|
1087
1087
|
|
|
1088
1088
|
___
|
|
1089
1089
|
|
|
@@ -1106,7 +1106,7 @@ fix iOS 日期时间格式如果是 - 就会报错的问题
|
|
|
1106
1106
|
|
|
1107
1107
|
#### Defined in
|
|
1108
1108
|
|
|
1109
|
-
[formatDateStr.ts:5](https://github.com/daysnap/utils/blob/
|
|
1109
|
+
[formatDateStr.ts:5](https://github.com/daysnap/utils/blob/a716607/src/formatDateStr.ts#L5)
|
|
1110
1110
|
|
|
1111
1111
|
___
|
|
1112
1112
|
|
|
@@ -1126,7 +1126,7 @@ ___
|
|
|
1126
1126
|
|
|
1127
1127
|
#### Defined in
|
|
1128
1128
|
|
|
1129
|
-
[formartDateToZN.ts:3](https://github.com/daysnap/utils/blob/
|
|
1129
|
+
[formartDateToZN.ts:3](https://github.com/daysnap/utils/blob/a716607/src/formartDateToZN.ts#L3)
|
|
1130
1130
|
|
|
1131
1131
|
___
|
|
1132
1132
|
|
|
@@ -1151,7 +1151,7 @@ formatMessage({ a: '123', b: { ba: '456' } }, ['b.ba']) => '456'
|
|
|
1151
1151
|
|
|
1152
1152
|
#### Defined in
|
|
1153
1153
|
|
|
1154
|
-
[formatMessage.ts:11](https://github.com/daysnap/utils/blob/
|
|
1154
|
+
[formatMessage.ts:11](https://github.com/daysnap/utils/blob/a716607/src/formatMessage.ts#L11)
|
|
1155
1155
|
|
|
1156
1156
|
___
|
|
1157
1157
|
|
|
@@ -1183,7 +1183,7 @@ rest = { xxx: 1 }
|
|
|
1183
1183
|
|
|
1184
1184
|
#### Defined in
|
|
1185
1185
|
|
|
1186
|
-
[formatPathParams.ts:8](https://github.com/daysnap/utils/blob/
|
|
1186
|
+
[formatPathParams.ts:8](https://github.com/daysnap/utils/blob/a716607/src/formatPathParams.ts#L8)
|
|
1187
1187
|
|
|
1188
1188
|
___
|
|
1189
1189
|
|
|
@@ -1205,7 +1205,7 @@ ___
|
|
|
1205
1205
|
|
|
1206
1206
|
#### Defined in
|
|
1207
1207
|
|
|
1208
|
-
[getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/
|
|
1208
|
+
[getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/a716607/src/getBlobByUrl.ts#L4)
|
|
1209
1209
|
|
|
1210
1210
|
___
|
|
1211
1211
|
|
|
@@ -1228,7 +1228,7 @@ ___
|
|
|
1228
1228
|
|
|
1229
1229
|
#### Defined in
|
|
1230
1230
|
|
|
1231
|
-
[storage/index.ts:9](https://github.com/daysnap/utils/blob/
|
|
1231
|
+
[storage/index.ts:9](https://github.com/daysnap/utils/blob/a716607/src/storage/index.ts#L9)
|
|
1232
1232
|
|
|
1233
1233
|
___
|
|
1234
1234
|
|
|
@@ -1250,7 +1250,7 @@ ___
|
|
|
1250
1250
|
|
|
1251
1251
|
#### Defined in
|
|
1252
1252
|
|
|
1253
|
-
[getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/
|
|
1253
|
+
[getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/a716607/src/getDayMillisecond.ts#L4)
|
|
1254
1254
|
|
|
1255
1255
|
___
|
|
1256
1256
|
|
|
@@ -1272,7 +1272,7 @@ ___
|
|
|
1272
1272
|
|
|
1273
1273
|
#### Defined in
|
|
1274
1274
|
|
|
1275
|
-
[getImageInfo.ts:4](https://github.com/daysnap/utils/blob/
|
|
1275
|
+
[getImageInfo.ts:4](https://github.com/daysnap/utils/blob/a716607/src/getImageInfo.ts#L4)
|
|
1276
1276
|
|
|
1277
1277
|
___
|
|
1278
1278
|
|
|
@@ -1295,7 +1295,7 @@ ___
|
|
|
1295
1295
|
|
|
1296
1296
|
#### Defined in
|
|
1297
1297
|
|
|
1298
|
-
[storage/index.ts:9](https://github.com/daysnap/utils/blob/
|
|
1298
|
+
[storage/index.ts:9](https://github.com/daysnap/utils/blob/a716607/src/storage/index.ts#L9)
|
|
1299
1299
|
|
|
1300
1300
|
___
|
|
1301
1301
|
|
|
@@ -1318,7 +1318,7 @@ ___
|
|
|
1318
1318
|
|
|
1319
1319
|
#### Defined in
|
|
1320
1320
|
|
|
1321
|
-
[getRandom.ts:7](https://github.com/daysnap/utils/blob/
|
|
1321
|
+
[getRandom.ts:7](https://github.com/daysnap/utils/blob/a716607/src/getRandom.ts#L7)
|
|
1322
1322
|
|
|
1323
1323
|
___
|
|
1324
1324
|
|
|
@@ -1334,7 +1334,7 @@ ___
|
|
|
1334
1334
|
|
|
1335
1335
|
#### Defined in
|
|
1336
1336
|
|
|
1337
|
-
[getRandomColor.ts:4](https://github.com/daysnap/utils/blob/
|
|
1337
|
+
[getRandomColor.ts:4](https://github.com/daysnap/utils/blob/a716607/src/getRandomColor.ts#L4)
|
|
1338
1338
|
|
|
1339
1339
|
___
|
|
1340
1340
|
|
|
@@ -1356,7 +1356,7 @@ ___
|
|
|
1356
1356
|
|
|
1357
1357
|
#### Defined in
|
|
1358
1358
|
|
|
1359
|
-
[getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/
|
|
1359
|
+
[getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/a716607/src/getRandomNumber.ts#L7)
|
|
1360
1360
|
|
|
1361
1361
|
___
|
|
1362
1362
|
|
|
@@ -1372,7 +1372,7 @@ ___
|
|
|
1372
1372
|
|
|
1373
1373
|
#### Defined in
|
|
1374
1374
|
|
|
1375
|
-
[getScrollTop.ts:4](https://github.com/daysnap/utils/blob/
|
|
1375
|
+
[getScrollTop.ts:4](https://github.com/daysnap/utils/blob/a716607/src/getScrollTop.ts#L4)
|
|
1376
1376
|
|
|
1377
1377
|
___
|
|
1378
1378
|
|
|
@@ -1394,7 +1394,7 @@ ___
|
|
|
1394
1394
|
|
|
1395
1395
|
#### Defined in
|
|
1396
1396
|
|
|
1397
|
-
[getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/
|
|
1397
|
+
[getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/a716607/src/getVideoInfo.ts#L4)
|
|
1398
1398
|
|
|
1399
1399
|
___
|
|
1400
1400
|
|
|
@@ -1410,7 +1410,7 @@ ___
|
|
|
1410
1410
|
|
|
1411
1411
|
#### Defined in
|
|
1412
1412
|
|
|
1413
|
-
[inBrowser.ts:4](https://github.com/daysnap/utils/blob/
|
|
1413
|
+
[inBrowser.ts:4](https://github.com/daysnap/utils/blob/a716607/src/inBrowser.ts#L4)
|
|
1414
1414
|
|
|
1415
1415
|
___
|
|
1416
1416
|
|
|
@@ -1432,7 +1432,7 @@ ___
|
|
|
1432
1432
|
|
|
1433
1433
|
#### Defined in
|
|
1434
1434
|
|
|
1435
|
-
[insertLink.ts:4](https://github.com/daysnap/utils/blob/
|
|
1435
|
+
[insertLink.ts:4](https://github.com/daysnap/utils/blob/a716607/src/insertLink.ts#L4)
|
|
1436
1436
|
|
|
1437
1437
|
▸ **insertLink**(`href`, `callback`): `void`
|
|
1438
1438
|
|
|
@@ -1449,7 +1449,7 @@ ___
|
|
|
1449
1449
|
|
|
1450
1450
|
#### Defined in
|
|
1451
1451
|
|
|
1452
|
-
[insertLink.ts:5](https://github.com/daysnap/utils/blob/
|
|
1452
|
+
[insertLink.ts:5](https://github.com/daysnap/utils/blob/a716607/src/insertLink.ts#L5)
|
|
1453
1453
|
|
|
1454
1454
|
___
|
|
1455
1455
|
|
|
@@ -1471,7 +1471,7 @@ ___
|
|
|
1471
1471
|
|
|
1472
1472
|
#### Defined in
|
|
1473
1473
|
|
|
1474
|
-
[insertScript.ts:4](https://github.com/daysnap/utils/blob/
|
|
1474
|
+
[insertScript.ts:4](https://github.com/daysnap/utils/blob/a716607/src/insertScript.ts#L4)
|
|
1475
1475
|
|
|
1476
1476
|
▸ **insertScript**(`src`, `callback`): `void`
|
|
1477
1477
|
|
|
@@ -1488,7 +1488,7 @@ ___
|
|
|
1488
1488
|
|
|
1489
1489
|
#### Defined in
|
|
1490
1490
|
|
|
1491
|
-
[insertScript.ts:5](https://github.com/daysnap/utils/blob/
|
|
1491
|
+
[insertScript.ts:5](https://github.com/daysnap/utils/blob/a716607/src/insertScript.ts#L5)
|
|
1492
1492
|
|
|
1493
1493
|
___
|
|
1494
1494
|
|
|
@@ -1510,7 +1510,7 @@ ___
|
|
|
1510
1510
|
|
|
1511
1511
|
#### Defined in
|
|
1512
1512
|
|
|
1513
|
-
[insertStyle.ts:4](https://github.com/daysnap/utils/blob/
|
|
1513
|
+
[insertStyle.ts:4](https://github.com/daysnap/utils/blob/a716607/src/insertStyle.ts#L4)
|
|
1514
1514
|
|
|
1515
1515
|
___
|
|
1516
1516
|
|
|
@@ -1539,7 +1539,7 @@ isAmount('1.123') => false
|
|
|
1539
1539
|
|
|
1540
1540
|
#### Defined in
|
|
1541
1541
|
|
|
1542
|
-
[isAmount.ts:11](https://github.com/daysnap/utils/blob/
|
|
1542
|
+
[isAmount.ts:11](https://github.com/daysnap/utils/blob/a716607/src/isAmount.ts#L11)
|
|
1543
1543
|
|
|
1544
1544
|
___
|
|
1545
1545
|
|
|
@@ -1555,7 +1555,7 @@ ___
|
|
|
1555
1555
|
|
|
1556
1556
|
#### Defined in
|
|
1557
1557
|
|
|
1558
|
-
[isAndroid.ts:4](https://github.com/daysnap/utils/blob/
|
|
1558
|
+
[isAndroid.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isAndroid.ts#L4)
|
|
1559
1559
|
|
|
1560
1560
|
___
|
|
1561
1561
|
|
|
@@ -1579,7 +1579,7 @@ val is any[]
|
|
|
1579
1579
|
|
|
1580
1580
|
#### Defined in
|
|
1581
1581
|
|
|
1582
|
-
[isArray.ts:6](https://github.com/daysnap/utils/blob/
|
|
1582
|
+
[isArray.ts:6](https://github.com/daysnap/utils/blob/a716607/src/isArray.ts#L6)
|
|
1583
1583
|
|
|
1584
1584
|
___
|
|
1585
1585
|
|
|
@@ -1601,7 +1601,7 @@ val is boolean
|
|
|
1601
1601
|
|
|
1602
1602
|
#### Defined in
|
|
1603
1603
|
|
|
1604
|
-
[isBoolean.ts:5](https://github.com/daysnap/utils/blob/
|
|
1604
|
+
[isBoolean.ts:5](https://github.com/daysnap/utils/blob/a716607/src/isBoolean.ts#L5)
|
|
1605
1605
|
|
|
1606
1606
|
___
|
|
1607
1607
|
|
|
@@ -1623,7 +1623,7 @@ ___
|
|
|
1623
1623
|
|
|
1624
1624
|
#### Defined in
|
|
1625
1625
|
|
|
1626
|
-
[isChinese.ts:4](https://github.com/daysnap/utils/blob/
|
|
1626
|
+
[isChinese.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isChinese.ts#L4)
|
|
1627
1627
|
|
|
1628
1628
|
___
|
|
1629
1629
|
|
|
@@ -1645,7 +1645,7 @@ val is Date
|
|
|
1645
1645
|
|
|
1646
1646
|
#### Defined in
|
|
1647
1647
|
|
|
1648
|
-
[isDate.ts:4](https://github.com/daysnap/utils/blob/
|
|
1648
|
+
[isDate.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isDate.ts#L4)
|
|
1649
1649
|
|
|
1650
1650
|
___
|
|
1651
1651
|
|
|
@@ -1667,7 +1667,7 @@ ___
|
|
|
1667
1667
|
|
|
1668
1668
|
#### Defined in
|
|
1669
1669
|
|
|
1670
|
-
[isEmail.ts:4](https://github.com/daysnap/utils/blob/
|
|
1670
|
+
[isEmail.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isEmail.ts#L4)
|
|
1671
1671
|
|
|
1672
1672
|
___
|
|
1673
1673
|
|
|
@@ -1689,7 +1689,7 @@ ___
|
|
|
1689
1689
|
|
|
1690
1690
|
#### Defined in
|
|
1691
1691
|
|
|
1692
|
-
[isEmpty.ts:6](https://github.com/daysnap/utils/blob/
|
|
1692
|
+
[isEmpty.ts:6](https://github.com/daysnap/utils/blob/a716607/src/isEmpty.ts#L6)
|
|
1693
1693
|
|
|
1694
1694
|
___
|
|
1695
1695
|
|
|
@@ -1711,7 +1711,7 @@ ___
|
|
|
1711
1711
|
|
|
1712
1712
|
#### Defined in
|
|
1713
1713
|
|
|
1714
|
-
[isEmptyArray.ts:6](https://github.com/daysnap/utils/blob/
|
|
1714
|
+
[isEmptyArray.ts:6](https://github.com/daysnap/utils/blob/a716607/src/isEmptyArray.ts#L6)
|
|
1715
1715
|
|
|
1716
1716
|
___
|
|
1717
1717
|
|
|
@@ -1733,7 +1733,7 @@ ___
|
|
|
1733
1733
|
|
|
1734
1734
|
#### Defined in
|
|
1735
1735
|
|
|
1736
|
-
[isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/
|
|
1736
|
+
[isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/a716607/src/isEmptyObject.ts#L5)
|
|
1737
1737
|
|
|
1738
1738
|
___
|
|
1739
1739
|
|
|
@@ -1755,7 +1755,7 @@ val is Error
|
|
|
1755
1755
|
|
|
1756
1756
|
#### Defined in
|
|
1757
1757
|
|
|
1758
|
-
[isError.ts:4](https://github.com/daysnap/utils/blob/
|
|
1758
|
+
[isError.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isError.ts#L4)
|
|
1759
1759
|
|
|
1760
1760
|
___
|
|
1761
1761
|
|
|
@@ -1777,7 +1777,7 @@ val is Function
|
|
|
1777
1777
|
|
|
1778
1778
|
#### Defined in
|
|
1779
1779
|
|
|
1780
|
-
[isFunction.ts:4](https://github.com/daysnap/utils/blob/
|
|
1780
|
+
[isFunction.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isFunction.ts#L4)
|
|
1781
1781
|
|
|
1782
1782
|
___
|
|
1783
1783
|
|
|
@@ -1795,7 +1795,7 @@ ___
|
|
|
1795
1795
|
|
|
1796
1796
|
#### Defined in
|
|
1797
1797
|
|
|
1798
|
-
[isIE.ts:6](https://github.com/daysnap/utils/blob/
|
|
1798
|
+
[isIE.ts:6](https://github.com/daysnap/utils/blob/a716607/src/isIE.ts#L6)
|
|
1799
1799
|
|
|
1800
1800
|
___
|
|
1801
1801
|
|
|
@@ -1811,7 +1811,7 @@ ___
|
|
|
1811
1811
|
|
|
1812
1812
|
#### Defined in
|
|
1813
1813
|
|
|
1814
|
-
[isIOS.ts:4](https://github.com/daysnap/utils/blob/
|
|
1814
|
+
[isIOS.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isIOS.ts#L4)
|
|
1815
1815
|
|
|
1816
1816
|
___
|
|
1817
1817
|
|
|
@@ -1833,7 +1833,7 @@ ___
|
|
|
1833
1833
|
|
|
1834
1834
|
#### Defined in
|
|
1835
1835
|
|
|
1836
|
-
[isIdCard.ts:4](https://github.com/daysnap/utils/blob/
|
|
1836
|
+
[isIdCard.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isIdCard.ts#L4)
|
|
1837
1837
|
|
|
1838
1838
|
___
|
|
1839
1839
|
|
|
@@ -1855,7 +1855,7 @@ ___
|
|
|
1855
1855
|
|
|
1856
1856
|
#### Defined in
|
|
1857
1857
|
|
|
1858
|
-
[isJSONString.ts:7](https://github.com/daysnap/utils/blob/
|
|
1858
|
+
[isJSONString.ts:7](https://github.com/daysnap/utils/blob/a716607/src/isJSONString.ts#L7)
|
|
1859
1859
|
|
|
1860
1860
|
___
|
|
1861
1861
|
|
|
@@ -1877,7 +1877,7 @@ ___
|
|
|
1877
1877
|
|
|
1878
1878
|
#### Defined in
|
|
1879
1879
|
|
|
1880
|
-
[isLan.ts:5](https://github.com/daysnap/utils/blob/
|
|
1880
|
+
[isLan.ts:5](https://github.com/daysnap/utils/blob/a716607/src/isLan.ts#L5)
|
|
1881
1881
|
|
|
1882
1882
|
___
|
|
1883
1883
|
|
|
@@ -1899,7 +1899,7 @@ ___
|
|
|
1899
1899
|
|
|
1900
1900
|
#### Defined in
|
|
1901
1901
|
|
|
1902
|
-
[isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/
|
|
1902
|
+
[isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/a716607/src/isLicenseCode.ts#L5)
|
|
1903
1903
|
|
|
1904
1904
|
___
|
|
1905
1905
|
|
|
@@ -1915,7 +1915,7 @@ ___
|
|
|
1915
1915
|
|
|
1916
1916
|
#### Defined in
|
|
1917
1917
|
|
|
1918
|
-
[isMobile.ts:4](https://github.com/daysnap/utils/blob/
|
|
1918
|
+
[isMobile.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isMobile.ts#L4)
|
|
1919
1919
|
|
|
1920
1920
|
___
|
|
1921
1921
|
|
|
@@ -1938,7 +1938,7 @@ ___
|
|
|
1938
1938
|
|
|
1939
1939
|
#### Defined in
|
|
1940
1940
|
|
|
1941
|
-
[isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/
|
|
1941
|
+
[isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/a716607/src/isNativeFunction.ts#L7)
|
|
1942
1942
|
|
|
1943
1943
|
___
|
|
1944
1944
|
|
|
@@ -1960,7 +1960,7 @@ val is null
|
|
|
1960
1960
|
|
|
1961
1961
|
#### Defined in
|
|
1962
1962
|
|
|
1963
|
-
[isNull.ts:4](https://github.com/daysnap/utils/blob/
|
|
1963
|
+
[isNull.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isNull.ts#L4)
|
|
1964
1964
|
|
|
1965
1965
|
___
|
|
1966
1966
|
|
|
@@ -1982,7 +1982,7 @@ val is number
|
|
|
1982
1982
|
|
|
1983
1983
|
#### Defined in
|
|
1984
1984
|
|
|
1985
|
-
[isNumber.ts:5](https://github.com/daysnap/utils/blob/
|
|
1985
|
+
[isNumber.ts:5](https://github.com/daysnap/utils/blob/a716607/src/isNumber.ts#L5)
|
|
1986
1986
|
|
|
1987
1987
|
___
|
|
1988
1988
|
|
|
@@ -2004,7 +2004,7 @@ val is Record<string, any\>
|
|
|
2004
2004
|
|
|
2005
2005
|
#### Defined in
|
|
2006
2006
|
|
|
2007
|
-
[isObject.ts:4](https://github.com/daysnap/utils/blob/
|
|
2007
|
+
[isObject.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isObject.ts#L4)
|
|
2008
2008
|
|
|
2009
2009
|
___
|
|
2010
2010
|
|
|
@@ -2026,7 +2026,7 @@ ___
|
|
|
2026
2026
|
|
|
2027
2027
|
#### Defined in
|
|
2028
2028
|
|
|
2029
|
-
[isPhone.ts:4](https://github.com/daysnap/utils/blob/
|
|
2029
|
+
[isPhone.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isPhone.ts#L4)
|
|
2030
2030
|
|
|
2031
2031
|
___
|
|
2032
2032
|
|
|
@@ -2054,7 +2054,7 @@ val is Promise<T\>
|
|
|
2054
2054
|
|
|
2055
2055
|
#### Defined in
|
|
2056
2056
|
|
|
2057
|
-
[isPromise.ts:4](https://github.com/daysnap/utils/blob/
|
|
2057
|
+
[isPromise.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isPromise.ts#L4)
|
|
2058
2058
|
|
|
2059
2059
|
___
|
|
2060
2060
|
|
|
@@ -2076,7 +2076,7 @@ val is RegExp
|
|
|
2076
2076
|
|
|
2077
2077
|
#### Defined in
|
|
2078
2078
|
|
|
2079
|
-
[isRegExp.ts:4](https://github.com/daysnap/utils/blob/
|
|
2079
|
+
[isRegExp.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isRegExp.ts#L4)
|
|
2080
2080
|
|
|
2081
2081
|
___
|
|
2082
2082
|
|
|
@@ -2098,7 +2098,7 @@ val is string
|
|
|
2098
2098
|
|
|
2099
2099
|
#### Defined in
|
|
2100
2100
|
|
|
2101
|
-
[isString.ts:4](https://github.com/daysnap/utils/blob/
|
|
2101
|
+
[isString.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isString.ts#L4)
|
|
2102
2102
|
|
|
2103
2103
|
___
|
|
2104
2104
|
|
|
@@ -2120,7 +2120,7 @@ val is undefined
|
|
|
2120
2120
|
|
|
2121
2121
|
#### Defined in
|
|
2122
2122
|
|
|
2123
|
-
[isUndefined.ts:4](https://github.com/daysnap/utils/blob/
|
|
2123
|
+
[isUndefined.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isUndefined.ts#L4)
|
|
2124
2124
|
|
|
2125
2125
|
___
|
|
2126
2126
|
|
|
@@ -2158,7 +2158,7 @@ ___
|
|
|
2158
2158
|
|
|
2159
2159
|
#### Defined in
|
|
2160
2160
|
|
|
2161
|
-
[isWeChat.ts:4](https://github.com/daysnap/utils/blob/
|
|
2161
|
+
[isWeChat.ts:4](https://github.com/daysnap/utils/blob/a716607/src/isWeChat.ts#L4)
|
|
2162
2162
|
|
|
2163
2163
|
___
|
|
2164
2164
|
|
|
@@ -2175,7 +2175,7 @@ https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html
|
|
|
2175
2175
|
|
|
2176
2176
|
#### Defined in
|
|
2177
2177
|
|
|
2178
|
-
[isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/
|
|
2178
|
+
[isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/a716607/src/isWeChatMiniProgram.ts#L5)
|
|
2179
2179
|
|
|
2180
2180
|
___
|
|
2181
2181
|
|
|
@@ -2195,7 +2195,7 @@ ___
|
|
|
2195
2195
|
|
|
2196
2196
|
#### Defined in
|
|
2197
2197
|
|
|
2198
|
-
[isWeChat.ts:12](https://github.com/daysnap/utils/blob/
|
|
2198
|
+
[isWeChat.ts:12](https://github.com/daysnap/utils/blob/a716607/src/isWeChat.ts#L12)
|
|
2199
2199
|
|
|
2200
2200
|
___
|
|
2201
2201
|
|
|
@@ -2217,7 +2217,7 @@ val is Window
|
|
|
2217
2217
|
|
|
2218
2218
|
#### Defined in
|
|
2219
2219
|
|
|
2220
|
-
[isWindow.ts:5](https://github.com/daysnap/utils/blob/
|
|
2220
|
+
[isWindow.ts:5](https://github.com/daysnap/utils/blob/a716607/src/isWindow.ts#L5)
|
|
2221
2221
|
|
|
2222
2222
|
___
|
|
2223
2223
|
|
|
@@ -2240,7 +2240,7 @@ kebabCase('helloWorld') => hello-world
|
|
|
2240
2240
|
|
|
2241
2241
|
#### Defined in
|
|
2242
2242
|
|
|
2243
|
-
[kebabCase.ts:5](https://github.com/daysnap/utils/blob/
|
|
2243
|
+
[kebabCase.ts:5](https://github.com/daysnap/utils/blob/a716607/src/kebabCase.ts#L5)
|
|
2244
2244
|
|
|
2245
2245
|
___
|
|
2246
2246
|
|
|
@@ -2269,7 +2269,7 @@ list 生成器,快速生成数据
|
|
|
2269
2269
|
|
|
2270
2270
|
#### Defined in
|
|
2271
2271
|
|
|
2272
|
-
[listGenerator.ts:5](https://github.com/daysnap/utils/blob/
|
|
2272
|
+
[listGenerator.ts:5](https://github.com/daysnap/utils/blob/a716607/src/listGenerator.ts#L5)
|
|
2273
2273
|
|
|
2274
2274
|
___
|
|
2275
2275
|
|
|
@@ -2294,7 +2294,7 @@ ___
|
|
|
2294
2294
|
|
|
2295
2295
|
#### Defined in
|
|
2296
2296
|
|
|
2297
|
-
[mousewheel.ts:22](https://github.com/daysnap/utils/blob/
|
|
2297
|
+
[mousewheel.ts:22](https://github.com/daysnap/utils/blob/a716607/src/mousewheel.ts#L22)
|
|
2298
2298
|
|
|
2299
2299
|
___
|
|
2300
2300
|
|
|
@@ -2310,7 +2310,7 @@ ___
|
|
|
2310
2310
|
|
|
2311
2311
|
#### Defined in
|
|
2312
2312
|
|
|
2313
|
-
[nf.ts:4](https://github.com/daysnap/utils/blob/
|
|
2313
|
+
[nf.ts:4](https://github.com/daysnap/utils/blob/a716607/src/nf.ts#L4)
|
|
2314
2314
|
|
|
2315
2315
|
___
|
|
2316
2316
|
|
|
@@ -2332,7 +2332,7 @@ ___
|
|
|
2332
2332
|
|
|
2333
2333
|
#### Defined in
|
|
2334
2334
|
|
|
2335
|
-
[normalizePath.ts:4](https://github.com/daysnap/utils/blob/
|
|
2335
|
+
[normalizePath.ts:4](https://github.com/daysnap/utils/blob/a716607/src/normalizePath.ts#L4)
|
|
2336
2336
|
|
|
2337
2337
|
___
|
|
2338
2338
|
|
|
@@ -2362,7 +2362,7 @@ ___
|
|
|
2362
2362
|
|
|
2363
2363
|
#### Defined in
|
|
2364
2364
|
|
|
2365
|
-
[omit.ts:4](https://github.com/daysnap/utils/blob/
|
|
2365
|
+
[omit.ts:4](https://github.com/daysnap/utils/blob/a716607/src/omit.ts#L4)
|
|
2366
2366
|
|
|
2367
2367
|
___
|
|
2368
2368
|
|
|
@@ -2386,7 +2386,7 @@ ___
|
|
|
2386
2386
|
|
|
2387
2387
|
#### Defined in
|
|
2388
2388
|
|
|
2389
|
-
[padding.ts:7](https://github.com/daysnap/utils/blob/
|
|
2389
|
+
[padding.ts:7](https://github.com/daysnap/utils/blob/a716607/src/padding.ts#L7)
|
|
2390
2390
|
|
|
2391
2391
|
___
|
|
2392
2392
|
|
|
@@ -2408,7 +2408,7 @@ ___
|
|
|
2408
2408
|
|
|
2409
2409
|
#### Defined in
|
|
2410
2410
|
|
|
2411
|
-
[parseDate.ts:4](https://github.com/daysnap/utils/blob/
|
|
2411
|
+
[parseDate.ts:4](https://github.com/daysnap/utils/blob/a716607/src/parseDate.ts#L4)
|
|
2412
2412
|
|
|
2413
2413
|
___
|
|
2414
2414
|
|
|
@@ -2431,7 +2431,7 @@ ___
|
|
|
2431
2431
|
|
|
2432
2432
|
#### Defined in
|
|
2433
2433
|
|
|
2434
|
-
[parseError.ts:8](https://github.com/daysnap/utils/blob/
|
|
2434
|
+
[parseError.ts:8](https://github.com/daysnap/utils/blob/a716607/src/parseError.ts#L8)
|
|
2435
2435
|
|
|
2436
2436
|
___
|
|
2437
2437
|
|
|
@@ -2461,7 +2461,7 @@ parseObject('a.b.c', 1) => { a: { b: { c: 1 } } }
|
|
|
2461
2461
|
|
|
2462
2462
|
#### Defined in
|
|
2463
2463
|
|
|
2464
|
-
[parseObject.ts:5](https://github.com/daysnap/utils/blob/
|
|
2464
|
+
[parseObject.ts:5](https://github.com/daysnap/utils/blob/a716607/src/parseObject.ts#L5)
|
|
2465
2465
|
|
|
2466
2466
|
___
|
|
2467
2467
|
|
|
@@ -2490,7 +2490,7 @@ ___
|
|
|
2490
2490
|
|
|
2491
2491
|
#### Defined in
|
|
2492
2492
|
|
|
2493
|
-
[parsePath.ts:6](https://github.com/daysnap/utils/blob/
|
|
2493
|
+
[parsePath.ts:6](https://github.com/daysnap/utils/blob/a716607/src/parsePath.ts#L6)
|
|
2494
2494
|
|
|
2495
2495
|
___
|
|
2496
2496
|
|
|
@@ -2513,7 +2513,7 @@ ___
|
|
|
2513
2513
|
|
|
2514
2514
|
#### Defined in
|
|
2515
2515
|
|
|
2516
|
-
[parseQuery.ts:8](https://github.com/daysnap/utils/blob/
|
|
2516
|
+
[parseQuery.ts:8](https://github.com/daysnap/utils/blob/a716607/src/parseQuery.ts#L8)
|
|
2517
2517
|
|
|
2518
2518
|
___
|
|
2519
2519
|
|
|
@@ -2543,7 +2543,7 @@ ___
|
|
|
2543
2543
|
|
|
2544
2544
|
#### Defined in
|
|
2545
2545
|
|
|
2546
|
-
[parseQueryString.ts:6](https://github.com/daysnap/utils/blob/
|
|
2546
|
+
[parseQueryString.ts:6](https://github.com/daysnap/utils/blob/a716607/src/parseQueryString.ts#L6)
|
|
2547
2547
|
|
|
2548
2548
|
___
|
|
2549
2549
|
|
|
@@ -2566,7 +2566,7 @@ pascalCase('hello-world') => HelloWorld
|
|
|
2566
2566
|
|
|
2567
2567
|
#### Defined in
|
|
2568
2568
|
|
|
2569
|
-
[pascalCase.ts:8](https://github.com/daysnap/utils/blob/
|
|
2569
|
+
[pascalCase.ts:8](https://github.com/daysnap/utils/blob/a716607/src/pascalCase.ts#L8)
|
|
2570
2570
|
|
|
2571
2571
|
___
|
|
2572
2572
|
|
|
@@ -2596,7 +2596,7 @@ ___
|
|
|
2596
2596
|
|
|
2597
2597
|
#### Defined in
|
|
2598
2598
|
|
|
2599
|
-
[pick.ts:4](https://github.com/daysnap/utils/blob/
|
|
2599
|
+
[pick.ts:4](https://github.com/daysnap/utils/blob/a716607/src/pick.ts#L4)
|
|
2600
2600
|
|
|
2601
2601
|
___
|
|
2602
2602
|
|
|
@@ -2619,7 +2619,7 @@ ___
|
|
|
2619
2619
|
|
|
2620
2620
|
#### Defined in
|
|
2621
2621
|
|
|
2622
|
-
[replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/
|
|
2622
|
+
[replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/a716607/src/replaceCrlf.ts#L4)
|
|
2623
2623
|
|
|
2624
2624
|
___
|
|
2625
2625
|
|
|
@@ -2643,7 +2643,7 @@ ___
|
|
|
2643
2643
|
|
|
2644
2644
|
#### Defined in
|
|
2645
2645
|
|
|
2646
|
-
[requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/
|
|
2646
|
+
[requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/a716607/src/requestFullScreen.ts#L6)
|
|
2647
2647
|
|
|
2648
2648
|
___
|
|
2649
2649
|
|
|
@@ -2669,7 +2669,7 @@ reserve(0, '--') => 0
|
|
|
2669
2669
|
|
|
2670
2670
|
#### Defined in
|
|
2671
2671
|
|
|
2672
|
-
[reserve.ts:8](https://github.com/daysnap/utils/blob/
|
|
2672
|
+
[reserve.ts:8](https://github.com/daysnap/utils/blob/a716607/src/reserve.ts#L8)
|
|
2673
2673
|
|
|
2674
2674
|
___
|
|
2675
2675
|
|
|
@@ -2693,7 +2693,7 @@ ___
|
|
|
2693
2693
|
|
|
2694
2694
|
#### Defined in
|
|
2695
2695
|
|
|
2696
|
-
[rgbToHex.ts:4](https://github.com/daysnap/utils/blob/
|
|
2696
|
+
[rgbToHex.ts:4](https://github.com/daysnap/utils/blob/a716607/src/rgbToHex.ts#L4)
|
|
2697
2697
|
|
|
2698
2698
|
___
|
|
2699
2699
|
|
|
@@ -2716,7 +2716,7 @@ ___
|
|
|
2716
2716
|
|
|
2717
2717
|
#### Defined in
|
|
2718
2718
|
|
|
2719
|
-
[round.ts:6](https://github.com/daysnap/utils/blob/
|
|
2719
|
+
[round.ts:6](https://github.com/daysnap/utils/blob/a716607/src/round.ts#L6)
|
|
2720
2720
|
|
|
2721
2721
|
___
|
|
2722
2722
|
|
|
@@ -2732,7 +2732,7 @@ ___
|
|
|
2732
2732
|
|
|
2733
2733
|
#### Defined in
|
|
2734
2734
|
|
|
2735
|
-
[scrollToTop.ts:4](https://github.com/daysnap/utils/blob/
|
|
2735
|
+
[scrollToTop.ts:4](https://github.com/daysnap/utils/blob/a716607/src/scrollToTop.ts#L4)
|
|
2736
2736
|
|
|
2737
2737
|
___
|
|
2738
2738
|
|
|
@@ -2754,7 +2754,7 @@ ___
|
|
|
2754
2754
|
|
|
2755
2755
|
#### Defined in
|
|
2756
2756
|
|
|
2757
|
-
[setScrollTop.ts:4](https://github.com/daysnap/utils/blob/
|
|
2757
|
+
[setScrollTop.ts:4](https://github.com/daysnap/utils/blob/a716607/src/setScrollTop.ts#L4)
|
|
2758
2758
|
|
|
2759
2759
|
___
|
|
2760
2760
|
|
|
@@ -2777,7 +2777,7 @@ ___
|
|
|
2777
2777
|
|
|
2778
2778
|
#### Defined in
|
|
2779
2779
|
|
|
2780
|
-
[sleep.ts:6](https://github.com/daysnap/utils/blob/
|
|
2780
|
+
[sleep.ts:6](https://github.com/daysnap/utils/blob/a716607/src/sleep.ts#L6)
|
|
2781
2781
|
|
|
2782
2782
|
___
|
|
2783
2783
|
|
|
@@ -2806,7 +2806,7 @@ ___
|
|
|
2806
2806
|
|
|
2807
2807
|
#### Defined in
|
|
2808
2808
|
|
|
2809
|
-
[splitArray.ts:4](https://github.com/daysnap/utils/blob/
|
|
2809
|
+
[splitArray.ts:4](https://github.com/daysnap/utils/blob/a716607/src/splitArray.ts#L4)
|
|
2810
2810
|
|
|
2811
2811
|
___
|
|
2812
2812
|
|
|
@@ -2829,7 +2829,7 @@ ___
|
|
|
2829
2829
|
|
|
2830
2830
|
#### Defined in
|
|
2831
2831
|
|
|
2832
|
-
[stringTrim.ts:6](https://github.com/daysnap/utils/blob/
|
|
2832
|
+
[stringTrim.ts:6](https://github.com/daysnap/utils/blob/a716607/src/stringTrim.ts#L6)
|
|
2833
2833
|
|
|
2834
2834
|
___
|
|
2835
2835
|
|
|
@@ -2851,7 +2851,7 @@ ___
|
|
|
2851
2851
|
|
|
2852
2852
|
#### Defined in
|
|
2853
2853
|
|
|
2854
|
-
[stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/
|
|
2854
|
+
[stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/a716607/src/stringifyQuery.ts#L7)
|
|
2855
2855
|
|
|
2856
2856
|
___
|
|
2857
2857
|
|
|
@@ -2875,7 +2875,7 @@ ___
|
|
|
2875
2875
|
|
|
2876
2876
|
#### Defined in
|
|
2877
2877
|
|
|
2878
|
-
[stringifyQueryString.ts:6](https://github.com/daysnap/utils/blob/
|
|
2878
|
+
[stringifyQueryString.ts:6](https://github.com/daysnap/utils/blob/a716607/src/stringifyQueryString.ts#L6)
|
|
2879
2879
|
|
|
2880
2880
|
___
|
|
2881
2881
|
|
|
@@ -2919,7 +2919,7 @@ ___
|
|
|
2919
2919
|
|
|
2920
2920
|
#### Defined in
|
|
2921
2921
|
|
|
2922
|
-
[throttle.ts:48](https://github.com/daysnap/utils/blob/
|
|
2922
|
+
[throttle.ts:48](https://github.com/daysnap/utils/blob/a716607/src/throttle.ts#L48)
|
|
2923
2923
|
|
|
2924
2924
|
___
|
|
2925
2925
|
|
|
@@ -2962,7 +2962,7 @@ ___
|
|
|
2962
2962
|
|
|
2963
2963
|
#### Defined in
|
|
2964
2964
|
|
|
2965
|
-
[throttle.ts:5](https://github.com/daysnap/utils/blob/
|
|
2965
|
+
[throttle.ts:5](https://github.com/daysnap/utils/blob/a716607/src/throttle.ts#L5)
|
|
2966
2966
|
|
|
2967
2967
|
___
|
|
2968
2968
|
|
|
@@ -3005,7 +3005,7 @@ ___
|
|
|
3005
3005
|
|
|
3006
3006
|
#### Defined in
|
|
3007
3007
|
|
|
3008
|
-
[throttle.ts:25](https://github.com/daysnap/utils/blob/
|
|
3008
|
+
[throttle.ts:25](https://github.com/daysnap/utils/blob/a716607/src/throttle.ts#L25)
|
|
3009
3009
|
|
|
3010
3010
|
___
|
|
3011
3011
|
|
|
@@ -3027,7 +3027,7 @@ ___
|
|
|
3027
3027
|
|
|
3028
3028
|
#### Defined in
|
|
3029
3029
|
|
|
3030
|
-
[toCDB.ts:4](https://github.com/daysnap/utils/blob/
|
|
3030
|
+
[toCDB.ts:4](https://github.com/daysnap/utils/blob/a716607/src/toCDB.ts#L4)
|
|
3031
3031
|
|
|
3032
3032
|
___
|
|
3033
3033
|
|
|
@@ -3049,7 +3049,7 @@ ___
|
|
|
3049
3049
|
|
|
3050
3050
|
#### Defined in
|
|
3051
3051
|
|
|
3052
|
-
[toDBC.ts:4](https://github.com/daysnap/utils/blob/
|
|
3052
|
+
[toDBC.ts:4](https://github.com/daysnap/utils/blob/a716607/src/toDBC.ts#L4)
|
|
3053
3053
|
|
|
3054
3054
|
___
|
|
3055
3055
|
|
|
@@ -3073,7 +3073,7 @@ ___
|
|
|
3073
3073
|
|
|
3074
3074
|
#### Defined in
|
|
3075
3075
|
|
|
3076
|
-
[typeOf.ts:6](https://github.com/daysnap/utils/blob/
|
|
3076
|
+
[typeOf.ts:6](https://github.com/daysnap/utils/blob/a716607/src/typeOf.ts#L6)
|
|
3077
3077
|
|
|
3078
3078
|
___
|
|
3079
3079
|
|
|
@@ -3102,4 +3102,4 @@ ___
|
|
|
3102
3102
|
|
|
3103
3103
|
#### Defined in
|
|
3104
3104
|
|
|
3105
|
-
[withPreventConsecutiveClicks.ts:4](https://github.com/daysnap/utils/blob/
|
|
3105
|
+
[withPreventConsecutiveClicks.ts:4](https://github.com/daysnap/utils/blob/a716607/src/withPreventConsecutiveClicks.ts#L4)
|
package/es/storage/factory.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { isArray } from '../isArray';
|
|
2
|
+
import { isObject } from '../isObject';
|
|
1
3
|
export function factory(type) {
|
|
2
4
|
const fn = window[type];
|
|
3
5
|
// 设置
|
|
@@ -21,7 +23,13 @@ export function factory(type) {
|
|
|
21
23
|
// 更新
|
|
22
24
|
const updateItem = (key, val) => {
|
|
23
25
|
const prev = getItem(key);
|
|
24
|
-
|
|
26
|
+
if (isArray(val)) {
|
|
27
|
+
val = [...(prev || []), ...val];
|
|
28
|
+
}
|
|
29
|
+
else if (isObject(val)) {
|
|
30
|
+
val = Object.assign(Object.assign({}, prev), val);
|
|
31
|
+
}
|
|
32
|
+
return setItem(key, val);
|
|
25
33
|
};
|
|
26
34
|
// 清除
|
|
27
35
|
const clear = () => {
|
package/lib/storage/factory.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.factory = void 0;
|
|
4
|
+
const isArray_1 = require("../isArray");
|
|
5
|
+
const isObject_1 = require("../isObject");
|
|
4
6
|
function factory(type) {
|
|
5
7
|
const fn = window[type];
|
|
6
8
|
// 设置
|
|
@@ -24,7 +26,13 @@ function factory(type) {
|
|
|
24
26
|
// 更新
|
|
25
27
|
const updateItem = (key, val) => {
|
|
26
28
|
const prev = getItem(key);
|
|
27
|
-
|
|
29
|
+
if ((0, isArray_1.isArray)(val)) {
|
|
30
|
+
val = [...(prev || []), ...val];
|
|
31
|
+
}
|
|
32
|
+
else if ((0, isObject_1.isObject)(val)) {
|
|
33
|
+
val = Object.assign(Object.assign({}, prev), val);
|
|
34
|
+
}
|
|
35
|
+
return setItem(key, val);
|
|
28
36
|
};
|
|
29
37
|
// 清除
|
|
30
38
|
const clear = () => {
|