@daysnap/utils 0.0.88 → 0.0.89

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/721f4a9/src/storage/factory.ts#L3)
38
+ [storage/factory.ts:3](https://github.com/daysnap/utils/blob/fb256c2/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/721f4a9/src/storage/factory.ts#L4)
52
+ [storage/factory.ts:4](https://github.com/daysnap/utils/blob/fb256c2/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/721f4a9/src/storage/factory.ts#L2)
72
+ [storage/factory.ts:2](https://github.com/daysnap/utils/blob/fb256c2/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/721f4a9/src/storage/factory.ts#L5)
92
+ [storage/factory.ts:5](https://github.com/daysnap/utils/blob/fb256c2/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/721f4a9/src/trap.ts#L12)
34
+ [trap.ts:12](https://github.com/daysnap/utils/blob/fb256c2/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/721f4a9/src/trap.ts#L10)
59
+ [trap.ts:10](https://github.com/daysnap/utils/blob/fb256c2/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/721f4a9/src/trap.ts#L11)
83
+ [trap.ts:11](https://github.com/daysnap/utils/blob/fb256c2/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/721f4a9/src/trap.ts#L8)
93
+ [trap.ts:8](https://github.com/daysnap/utils/blob/fb256c2/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/721f4a9/src/trap.ts#L9)
118
+ [trap.ts:9](https://github.com/daysnap/utils/blob/fb256c2/src/trap.ts#L9)
package/docs/modules.md CHANGED
@@ -60,6 +60,7 @@
60
60
  - [getRandom](modules.md#getrandom)
61
61
  - [getRandomColor](modules.md#getrandomcolor)
62
62
  - [getRandomNumber](modules.md#getrandomnumber)
63
+ - [getScrollTop](modules.md#getscrolltop)
63
64
  - [getVideoInfo](modules.md#getvideoinfo)
64
65
  - [inBrowser](modules.md#inbrowser)
65
66
  - [insertLink](modules.md#insertlink)
@@ -119,6 +120,7 @@
119
120
  - [rgbToHex](modules.md#rgbtohex)
120
121
  - [round](modules.md#round)
121
122
  - [scrollToTop](modules.md#scrolltotop)
123
+ - [setScrollTop](modules.md#setscrolltop)
122
124
  - [sleep](modules.md#sleep)
123
125
  - [splitArray](modules.md#splitarray)
124
126
  - [stringTrim](modules.md#stringtrim)
@@ -140,7 +142,7 @@
140
142
 
141
143
  #### Defined in
142
144
 
143
- [trap.ts:15](https://github.com/daysnap/utils/blob/721f4a9/src/trap.ts#L15)
145
+ [trap.ts:15](https://github.com/daysnap/utils/blob/fb256c2/src/trap.ts#L15)
144
146
 
145
147
  ## Functions
146
148
 
@@ -178,7 +180,7 @@ res = { '1': '男', '2': '女' }
178
180
 
179
181
  #### Defined in
180
182
 
181
- [ato.ts:12](https://github.com/daysnap/utils/blob/721f4a9/src/ato.ts#L12)
183
+ [ato.ts:12](https://github.com/daysnap/utils/blob/fb256c2/src/ato.ts#L12)
182
184
 
183
185
  ▸ **ato**<`T`, `K`\>(`options`, `labelKey`, `valueKey`): `Record`<`T`[`K`], `any`\>
184
186
 
@@ -203,7 +205,7 @@ res = { '1': '男', '2': '女' }
203
205
 
204
206
  #### Defined in
205
207
 
206
- [ato.ts:16](https://github.com/daysnap/utils/blob/721f4a9/src/ato.ts#L16)
208
+ [ato.ts:16](https://github.com/daysnap/utils/blob/fb256c2/src/ato.ts#L16)
207
209
 
208
210
  ___
209
211
 
@@ -223,7 +225,7 @@ ___
223
225
 
224
226
  #### Defined in
225
227
 
226
- decode.ts:41
228
+ [decode.ts:41](https://github.com/daysnap/utils/blob/fb256c2/src/decode.ts#L41)
227
229
 
228
230
  ___
229
231
 
@@ -246,7 +248,7 @@ base64 转 blob
246
248
 
247
249
  #### Defined in
248
250
 
249
- [base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/base64ToBlob.ts#L6)
251
+ [base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/base64ToBlob.ts#L6)
250
252
 
251
253
  ___
252
254
 
@@ -268,7 +270,7 @@ blob 转 base64
268
270
 
269
271
  #### Defined in
270
272
 
271
- [blobToBase64.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/blobToBase64.ts#L4)
273
+ [blobToBase64.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/blobToBase64.ts#L4)
272
274
 
273
275
  ___
274
276
 
@@ -288,7 +290,7 @@ ___
288
290
 
289
291
  #### Defined in
290
292
 
291
- decode.ts:8
293
+ [decode.ts:8](https://github.com/daysnap/utils/blob/fb256c2/src/decode.ts#L8)
292
294
 
293
295
  ___
294
296
 
@@ -329,7 +331,7 @@ ___
329
331
 
330
332
  #### Defined in
331
333
 
332
- [cached.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/cached.ts#L5)
334
+ [cached.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/cached.ts#L5)
333
335
 
334
336
  ___
335
337
 
@@ -352,7 +354,7 @@ camelCase('hello-world') => helloWorld
352
354
 
353
355
  #### Defined in
354
356
 
355
- [camelCase.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/camelCase.ts#L5)
357
+ [camelCase.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/camelCase.ts#L5)
356
358
 
357
359
  ___
358
360
 
@@ -376,7 +378,7 @@ canvas 转 blob 文件
376
378
 
377
379
  #### Defined in
378
380
 
379
- [canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/canvasToBlob.ts#L4)
381
+ [canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/canvasToBlob.ts#L4)
380
382
 
381
383
  ___
382
384
 
@@ -399,7 +401,7 @@ capitalize('hello world') => Hello world
399
401
 
400
402
  #### Defined in
401
403
 
402
- [capitalize.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/capitalize.ts#L5)
404
+ [capitalize.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/capitalize.ts#L5)
403
405
 
404
406
  ___
405
407
 
@@ -423,7 +425,7 @@ ___
423
425
 
424
426
  #### Defined in
425
427
 
426
- [clamp.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/clamp.ts#L7)
428
+ [clamp.ts:7](https://github.com/daysnap/utils/blob/fb256c2/src/clamp.ts#L7)
427
429
 
428
430
  ___
429
431
 
@@ -451,7 +453,7 @@ ___
451
453
 
452
454
  #### Defined in
453
455
 
454
- [clone.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/clone.ts#L8)
456
+ [clone.ts:8](https://github.com/daysnap/utils/blob/fb256c2/src/clone.ts#L8)
455
457
 
456
458
  ___
457
459
 
@@ -479,7 +481,7 @@ ___
479
481
 
480
482
  #### Defined in
481
483
 
482
- [cloneSimple.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/cloneSimple.ts#L7)
484
+ [cloneSimple.ts:7](https://github.com/daysnap/utils/blob/fb256c2/src/cloneSimple.ts#L7)
483
485
 
484
486
  ___
485
487
 
@@ -501,7 +503,7 @@ ___
501
503
 
502
504
  #### Defined in
503
505
 
504
- [createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/createHexColorByHash.ts#L4)
506
+ [createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/createHexColorByHash.ts#L4)
505
507
 
506
508
  ___
507
509
 
@@ -527,7 +529,7 @@ ___
527
529
 
528
530
  #### Defined in
529
531
 
530
- [compareVersion.ts:9](https://github.com/daysnap/utils/blob/721f4a9/src/compareVersion.ts#L9)
532
+ [compareVersion.ts:9](https://github.com/daysnap/utils/blob/fb256c2/src/compareVersion.ts#L9)
531
533
 
532
534
  ___
533
535
 
@@ -549,7 +551,7 @@ ___
549
551
 
550
552
  #### Defined in
551
553
 
552
- [compressImage.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/compressImage.ts#L6)
554
+ [compressImage.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/compressImage.ts#L6)
553
555
 
554
556
  ___
555
557
 
@@ -587,7 +589,7 @@ ___
587
589
 
588
590
  #### Defined in
589
591
 
590
- [createLinearFunction.ts:9](https://github.com/daysnap/utils/blob/721f4a9/src/createLinearFunction.ts#L9)
592
+ [createLinearFunction.ts:9](https://github.com/daysnap/utils/blob/fb256c2/src/createLinearFunction.ts#L9)
591
593
 
592
594
  ___
593
595
 
@@ -619,7 +621,7 @@ ___
619
621
 
620
622
  #### Defined in
621
623
 
622
- [trap.ts:49](https://github.com/daysnap/utils/blob/721f4a9/src/trap.ts#L49)
624
+ [trap.ts:49](https://github.com/daysnap/utils/blob/fb256c2/src/trap.ts#L49)
623
625
 
624
626
  ___
625
627
 
@@ -682,7 +684,7 @@ fn() 执行的时候就会执行showLoading
682
684
 
683
685
  #### Defined in
684
686
 
685
- [createWithLoading.ts:9](https://github.com/daysnap/utils/blob/721f4a9/src/createWithLoading.ts#L9)
687
+ [createWithLoading.ts:9](https://github.com/daysnap/utils/blob/fb256c2/src/createWithLoading.ts#L9)
686
688
 
687
689
  ___
688
690
 
@@ -725,7 +727,7 @@ ___
725
727
 
726
728
  #### Defined in
727
729
 
728
- [debounce.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/debounce.ts#L5)
730
+ [debounce.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/debounce.ts#L5)
729
731
 
730
732
  ___
731
733
 
@@ -749,7 +751,7 @@ ___
749
751
 
750
752
  #### Defined in
751
753
 
752
- [downloadFile.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/downloadFile.ts#L4)
754
+ [downloadFile.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/downloadFile.ts#L4)
753
755
 
754
756
  ___
755
757
 
@@ -778,7 +780,7 @@ ___
778
780
 
779
781
  #### Defined in
780
782
 
781
- [each.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/each.ts#L4)
783
+ [each.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/each.ts#L4)
782
784
 
783
785
  ▸ **each**<`T`\>(`data`, `callback`): `void`
784
786
 
@@ -801,7 +803,7 @@ ___
801
803
 
802
804
  #### Defined in
803
805
 
804
- [each.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/each.ts#L8)
806
+ [each.ts:8](https://github.com/daysnap/utils/blob/fb256c2/src/each.ts#L8)
805
807
 
806
808
  ___
807
809
 
@@ -819,7 +821,7 @@ ___
819
821
 
820
822
  #### Defined in
821
823
 
822
- [exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/exitFullscreen.ts#L6)
824
+ [exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/exitFullscreen.ts#L6)
823
825
 
824
826
  ___
825
827
 
@@ -848,7 +850,7 @@ ___
848
850
 
849
851
  #### Defined in
850
852
 
851
- [storage/factory.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/storage/factory.ts#L8)
853
+ [storage/factory.ts:8](https://github.com/daysnap/utils/blob/fb256c2/src/storage/factory.ts#L8)
852
854
 
853
855
  ___
854
856
 
@@ -870,7 +872,7 @@ ___
870
872
 
871
873
  #### Defined in
872
874
 
873
- [filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/filterBankCardNo.ts#L4)
875
+ [filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/filterBankCardNo.ts#L4)
874
876
 
875
877
  ___
876
878
 
@@ -892,7 +894,7 @@ ___
892
894
 
893
895
  #### Defined in
894
896
 
895
- [filterCRLF.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/filterCRLF.ts#L4)
897
+ [filterCRLF.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/filterCRLF.ts#L4)
896
898
 
897
899
  ___
898
900
 
@@ -914,7 +916,7 @@ ___
914
916
 
915
917
  #### Defined in
916
918
 
917
- [filterEmoji.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/filterEmoji.ts#L4)
919
+ [filterEmoji.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/filterEmoji.ts#L4)
918
920
 
919
921
  ___
920
922
 
@@ -937,7 +939,7 @@ ___
937
939
 
938
940
  #### Defined in
939
941
 
940
- [filterEmptyValue.ts:12](https://github.com/daysnap/utils/blob/721f4a9/src/filterEmptyValue.ts#L12)
942
+ [filterEmptyValue.ts:12](https://github.com/daysnap/utils/blob/fb256c2/src/filterEmptyValue.ts#L12)
941
943
 
942
944
  ___
943
945
 
@@ -960,7 +962,7 @@ ___
960
962
 
961
963
  #### Defined in
962
964
 
963
- [filterIdCard.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/filterIdCard.ts#L5)
965
+ [filterIdCard.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/filterIdCard.ts#L5)
964
966
 
965
967
  ___
966
968
 
@@ -982,7 +984,7 @@ ___
982
984
 
983
985
  #### Defined in
984
986
 
985
- [filterName.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/filterName.ts#L4)
987
+ [filterName.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/filterName.ts#L4)
986
988
 
987
989
  ___
988
990
 
@@ -1007,7 +1009,7 @@ filterPhone('13177778888', ' ') => 131 **** 8888
1007
1009
 
1008
1010
  #### Defined in
1009
1011
 
1010
- [filterPhone.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/filterPhone.ts#L6)
1012
+ [filterPhone.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/filterPhone.ts#L6)
1011
1013
 
1012
1014
  ___
1013
1015
 
@@ -1034,7 +1036,7 @@ str = '131****8888'
1034
1036
 
1035
1037
  #### Defined in
1036
1038
 
1037
- [filterString.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/filterString.ts#L6)
1039
+ [filterString.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/filterString.ts#L6)
1038
1040
 
1039
1041
  ___
1040
1042
 
@@ -1057,7 +1059,7 @@ ___
1057
1059
 
1058
1060
  #### Defined in
1059
1061
 
1060
- [formatAmount.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/formatAmount.ts#L4)
1062
+ [formatAmount.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/formatAmount.ts#L4)
1061
1063
 
1062
1064
  ___
1063
1065
 
@@ -1081,7 +1083,7 @@ ___
1081
1083
 
1082
1084
  #### Defined in
1083
1085
 
1084
- [formatDate.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/formatDate.ts#L8)
1086
+ [formatDate.ts:8](https://github.com/daysnap/utils/blob/fb256c2/src/formatDate.ts#L8)
1085
1087
 
1086
1088
  ___
1087
1089
 
@@ -1104,7 +1106,7 @@ fix iOS 日期时间格式如果是 - 就会报错的问题
1104
1106
 
1105
1107
  #### Defined in
1106
1108
 
1107
- [formatDateStr.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/formatDateStr.ts#L5)
1109
+ [formatDateStr.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/formatDateStr.ts#L5)
1108
1110
 
1109
1111
  ___
1110
1112
 
@@ -1124,7 +1126,7 @@ ___
1124
1126
 
1125
1127
  #### Defined in
1126
1128
 
1127
- [formartDateToZN.ts:3](https://github.com/daysnap/utils/blob/721f4a9/src/formartDateToZN.ts#L3)
1129
+ [formartDateToZN.ts:3](https://github.com/daysnap/utils/blob/fb256c2/src/formartDateToZN.ts#L3)
1128
1130
 
1129
1131
  ___
1130
1132
 
@@ -1149,7 +1151,7 @@ formatMessage({ a: '123', b: { ba: '456' } }, ['b.ba']) => '456'
1149
1151
 
1150
1152
  #### Defined in
1151
1153
 
1152
- [formatMessage.ts:11](https://github.com/daysnap/utils/blob/721f4a9/src/formatMessage.ts#L11)
1154
+ [formatMessage.ts:11](https://github.com/daysnap/utils/blob/fb256c2/src/formatMessage.ts#L11)
1153
1155
 
1154
1156
  ___
1155
1157
 
@@ -1181,7 +1183,7 @@ rest = { xxx: 1 }
1181
1183
 
1182
1184
  #### Defined in
1183
1185
 
1184
- [formatPathParams.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/formatPathParams.ts#L8)
1186
+ [formatPathParams.ts:8](https://github.com/daysnap/utils/blob/fb256c2/src/formatPathParams.ts#L8)
1185
1187
 
1186
1188
  ___
1187
1189
 
@@ -1203,7 +1205,7 @@ ___
1203
1205
 
1204
1206
  #### Defined in
1205
1207
 
1206
- [getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/getBlobByUrl.ts#L4)
1208
+ [getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/getBlobByUrl.ts#L4)
1207
1209
 
1208
1210
  ___
1209
1211
 
@@ -1226,7 +1228,7 @@ ___
1226
1228
 
1227
1229
  #### Defined in
1228
1230
 
1229
- [storage/index.ts:9](https://github.com/daysnap/utils/blob/721f4a9/src/storage/index.ts#L9)
1231
+ [storage/index.ts:9](https://github.com/daysnap/utils/blob/fb256c2/src/storage/index.ts#L9)
1230
1232
 
1231
1233
  ___
1232
1234
 
@@ -1248,7 +1250,7 @@ ___
1248
1250
 
1249
1251
  #### Defined in
1250
1252
 
1251
- [getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/getDayMillisecond.ts#L4)
1253
+ [getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/getDayMillisecond.ts#L4)
1252
1254
 
1253
1255
  ___
1254
1256
 
@@ -1270,7 +1272,7 @@ ___
1270
1272
 
1271
1273
  #### Defined in
1272
1274
 
1273
- [getImageInfo.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/getImageInfo.ts#L4)
1275
+ [getImageInfo.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/getImageInfo.ts#L4)
1274
1276
 
1275
1277
  ___
1276
1278
 
@@ -1293,7 +1295,7 @@ ___
1293
1295
 
1294
1296
  #### Defined in
1295
1297
 
1296
- [storage/index.ts:9](https://github.com/daysnap/utils/blob/721f4a9/src/storage/index.ts#L9)
1298
+ [storage/index.ts:9](https://github.com/daysnap/utils/blob/fb256c2/src/storage/index.ts#L9)
1297
1299
 
1298
1300
  ___
1299
1301
 
@@ -1316,7 +1318,7 @@ ___
1316
1318
 
1317
1319
  #### Defined in
1318
1320
 
1319
- [getRandom.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/getRandom.ts#L7)
1321
+ [getRandom.ts:7](https://github.com/daysnap/utils/blob/fb256c2/src/getRandom.ts#L7)
1320
1322
 
1321
1323
  ___
1322
1324
 
@@ -1332,7 +1334,7 @@ ___
1332
1334
 
1333
1335
  #### Defined in
1334
1336
 
1335
- [getRandomColor.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/getRandomColor.ts#L4)
1337
+ [getRandomColor.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/getRandomColor.ts#L4)
1336
1338
 
1337
1339
  ___
1338
1340
 
@@ -1354,7 +1356,23 @@ ___
1354
1356
 
1355
1357
  #### Defined in
1356
1358
 
1357
- [getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/getRandomNumber.ts#L7)
1359
+ [getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/fb256c2/src/getRandomNumber.ts#L7)
1360
+
1361
+ ___
1362
+
1363
+ ### getScrollTop
1364
+
1365
+ ▸ **getScrollTop**(): `number`
1366
+
1367
+ 获取 scrollTop
1368
+
1369
+ #### Returns
1370
+
1371
+ `number`
1372
+
1373
+ #### Defined in
1374
+
1375
+ [getScrollTop.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/getScrollTop.ts#L4)
1358
1376
 
1359
1377
  ___
1360
1378
 
@@ -1376,7 +1394,7 @@ ___
1376
1394
 
1377
1395
  #### Defined in
1378
1396
 
1379
- [getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/getVideoInfo.ts#L4)
1397
+ [getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/getVideoInfo.ts#L4)
1380
1398
 
1381
1399
  ___
1382
1400
 
@@ -1392,7 +1410,7 @@ ___
1392
1410
 
1393
1411
  #### Defined in
1394
1412
 
1395
- [inBrowser.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/inBrowser.ts#L4)
1413
+ [inBrowser.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/inBrowser.ts#L4)
1396
1414
 
1397
1415
  ___
1398
1416
 
@@ -1414,7 +1432,7 @@ ___
1414
1432
 
1415
1433
  #### Defined in
1416
1434
 
1417
- [insertLink.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/insertLink.ts#L4)
1435
+ [insertLink.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/insertLink.ts#L4)
1418
1436
 
1419
1437
  ▸ **insertLink**(`href`, `callback`): `void`
1420
1438
 
@@ -1431,7 +1449,7 @@ ___
1431
1449
 
1432
1450
  #### Defined in
1433
1451
 
1434
- [insertLink.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/insertLink.ts#L5)
1452
+ [insertLink.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/insertLink.ts#L5)
1435
1453
 
1436
1454
  ___
1437
1455
 
@@ -1453,7 +1471,7 @@ ___
1453
1471
 
1454
1472
  #### Defined in
1455
1473
 
1456
- [insertScript.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/insertScript.ts#L4)
1474
+ [insertScript.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/insertScript.ts#L4)
1457
1475
 
1458
1476
  ▸ **insertScript**(`src`, `callback`): `void`
1459
1477
 
@@ -1470,7 +1488,7 @@ ___
1470
1488
 
1471
1489
  #### Defined in
1472
1490
 
1473
- [insertScript.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/insertScript.ts#L5)
1491
+ [insertScript.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/insertScript.ts#L5)
1474
1492
 
1475
1493
  ___
1476
1494
 
@@ -1492,7 +1510,7 @@ ___
1492
1510
 
1493
1511
  #### Defined in
1494
1512
 
1495
- [insertStyle.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/insertStyle.ts#L4)
1513
+ [insertStyle.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/insertStyle.ts#L4)
1496
1514
 
1497
1515
  ___
1498
1516
 
@@ -1521,7 +1539,7 @@ isAmount('1.123') => false
1521
1539
 
1522
1540
  #### Defined in
1523
1541
 
1524
- [isAmount.ts:11](https://github.com/daysnap/utils/blob/721f4a9/src/isAmount.ts#L11)
1542
+ [isAmount.ts:11](https://github.com/daysnap/utils/blob/fb256c2/src/isAmount.ts#L11)
1525
1543
 
1526
1544
  ___
1527
1545
 
@@ -1537,7 +1555,7 @@ ___
1537
1555
 
1538
1556
  #### Defined in
1539
1557
 
1540
- [isAndroid.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isAndroid.ts#L4)
1558
+ [isAndroid.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isAndroid.ts#L4)
1541
1559
 
1542
1560
  ___
1543
1561
 
@@ -1561,7 +1579,7 @@ val is any[]
1561
1579
 
1562
1580
  #### Defined in
1563
1581
 
1564
- [isArray.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/isArray.ts#L6)
1582
+ [isArray.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/isArray.ts#L6)
1565
1583
 
1566
1584
  ___
1567
1585
 
@@ -1583,7 +1601,7 @@ val is boolean
1583
1601
 
1584
1602
  #### Defined in
1585
1603
 
1586
- [isBoolean.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isBoolean.ts#L5)
1604
+ [isBoolean.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/isBoolean.ts#L5)
1587
1605
 
1588
1606
  ___
1589
1607
 
@@ -1605,7 +1623,7 @@ ___
1605
1623
 
1606
1624
  #### Defined in
1607
1625
 
1608
- [isChinese.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isChinese.ts#L4)
1626
+ [isChinese.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isChinese.ts#L4)
1609
1627
 
1610
1628
  ___
1611
1629
 
@@ -1627,7 +1645,7 @@ val is Date
1627
1645
 
1628
1646
  #### Defined in
1629
1647
 
1630
- [isDate.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isDate.ts#L4)
1648
+ [isDate.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isDate.ts#L4)
1631
1649
 
1632
1650
  ___
1633
1651
 
@@ -1649,7 +1667,7 @@ ___
1649
1667
 
1650
1668
  #### Defined in
1651
1669
 
1652
- [isEmail.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isEmail.ts#L4)
1670
+ [isEmail.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isEmail.ts#L4)
1653
1671
 
1654
1672
  ___
1655
1673
 
@@ -1671,7 +1689,7 @@ ___
1671
1689
 
1672
1690
  #### Defined in
1673
1691
 
1674
- [isEmpty.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/isEmpty.ts#L6)
1692
+ [isEmpty.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/isEmpty.ts#L6)
1675
1693
 
1676
1694
  ___
1677
1695
 
@@ -1693,7 +1711,7 @@ ___
1693
1711
 
1694
1712
  #### Defined in
1695
1713
 
1696
- [isEmptyArray.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/isEmptyArray.ts#L6)
1714
+ [isEmptyArray.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/isEmptyArray.ts#L6)
1697
1715
 
1698
1716
  ___
1699
1717
 
@@ -1715,7 +1733,7 @@ ___
1715
1733
 
1716
1734
  #### Defined in
1717
1735
 
1718
- [isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isEmptyObject.ts#L5)
1736
+ [isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/isEmptyObject.ts#L5)
1719
1737
 
1720
1738
  ___
1721
1739
 
@@ -1737,7 +1755,7 @@ val is Error
1737
1755
 
1738
1756
  #### Defined in
1739
1757
 
1740
- [isError.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isError.ts#L4)
1758
+ [isError.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isError.ts#L4)
1741
1759
 
1742
1760
  ___
1743
1761
 
@@ -1759,7 +1777,7 @@ val is Function
1759
1777
 
1760
1778
  #### Defined in
1761
1779
 
1762
- [isFunction.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isFunction.ts#L4)
1780
+ [isFunction.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isFunction.ts#L4)
1763
1781
 
1764
1782
  ___
1765
1783
 
@@ -1777,7 +1795,7 @@ ___
1777
1795
 
1778
1796
  #### Defined in
1779
1797
 
1780
- [isIE.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/isIE.ts#L6)
1798
+ [isIE.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/isIE.ts#L6)
1781
1799
 
1782
1800
  ___
1783
1801
 
@@ -1793,7 +1811,7 @@ ___
1793
1811
 
1794
1812
  #### Defined in
1795
1813
 
1796
- [isIOS.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isIOS.ts#L4)
1814
+ [isIOS.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isIOS.ts#L4)
1797
1815
 
1798
1816
  ___
1799
1817
 
@@ -1815,7 +1833,7 @@ ___
1815
1833
 
1816
1834
  #### Defined in
1817
1835
 
1818
- [isIdCard.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isIdCard.ts#L4)
1836
+ [isIdCard.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isIdCard.ts#L4)
1819
1837
 
1820
1838
  ___
1821
1839
 
@@ -1837,7 +1855,7 @@ ___
1837
1855
 
1838
1856
  #### Defined in
1839
1857
 
1840
- [isJSONString.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/isJSONString.ts#L7)
1858
+ [isJSONString.ts:7](https://github.com/daysnap/utils/blob/fb256c2/src/isJSONString.ts#L7)
1841
1859
 
1842
1860
  ___
1843
1861
 
@@ -1859,7 +1877,7 @@ ___
1859
1877
 
1860
1878
  #### Defined in
1861
1879
 
1862
- [isLan.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isLan.ts#L5)
1880
+ [isLan.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/isLan.ts#L5)
1863
1881
 
1864
1882
  ___
1865
1883
 
@@ -1881,7 +1899,7 @@ ___
1881
1899
 
1882
1900
  #### Defined in
1883
1901
 
1884
- [isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isLicenseCode.ts#L5)
1902
+ [isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/isLicenseCode.ts#L5)
1885
1903
 
1886
1904
  ___
1887
1905
 
@@ -1897,7 +1915,7 @@ ___
1897
1915
 
1898
1916
  #### Defined in
1899
1917
 
1900
- [isMobile.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isMobile.ts#L4)
1918
+ [isMobile.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isMobile.ts#L4)
1901
1919
 
1902
1920
  ___
1903
1921
 
@@ -1920,7 +1938,7 @@ ___
1920
1938
 
1921
1939
  #### Defined in
1922
1940
 
1923
- [isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/isNativeFunction.ts#L7)
1941
+ [isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/fb256c2/src/isNativeFunction.ts#L7)
1924
1942
 
1925
1943
  ___
1926
1944
 
@@ -1942,7 +1960,7 @@ val is null
1942
1960
 
1943
1961
  #### Defined in
1944
1962
 
1945
- [isNull.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isNull.ts#L4)
1963
+ [isNull.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isNull.ts#L4)
1946
1964
 
1947
1965
  ___
1948
1966
 
@@ -1964,7 +1982,7 @@ val is number
1964
1982
 
1965
1983
  #### Defined in
1966
1984
 
1967
- [isNumber.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isNumber.ts#L5)
1985
+ [isNumber.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/isNumber.ts#L5)
1968
1986
 
1969
1987
  ___
1970
1988
 
@@ -1986,7 +2004,7 @@ val is Record<string, any\>
1986
2004
 
1987
2005
  #### Defined in
1988
2006
 
1989
- [isObject.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isObject.ts#L4)
2007
+ [isObject.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isObject.ts#L4)
1990
2008
 
1991
2009
  ___
1992
2010
 
@@ -2008,7 +2026,7 @@ ___
2008
2026
 
2009
2027
  #### Defined in
2010
2028
 
2011
- [isPhone.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isPhone.ts#L4)
2029
+ [isPhone.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isPhone.ts#L4)
2012
2030
 
2013
2031
  ___
2014
2032
 
@@ -2036,7 +2054,7 @@ val is Promise<T\>
2036
2054
 
2037
2055
  #### Defined in
2038
2056
 
2039
- [isPromise.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isPromise.ts#L4)
2057
+ [isPromise.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isPromise.ts#L4)
2040
2058
 
2041
2059
  ___
2042
2060
 
@@ -2058,7 +2076,7 @@ val is RegExp
2058
2076
 
2059
2077
  #### Defined in
2060
2078
 
2061
- [isRegExp.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isRegExp.ts#L4)
2079
+ [isRegExp.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isRegExp.ts#L4)
2062
2080
 
2063
2081
  ___
2064
2082
 
@@ -2080,7 +2098,7 @@ val is string
2080
2098
 
2081
2099
  #### Defined in
2082
2100
 
2083
- [isString.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isString.ts#L4)
2101
+ [isString.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isString.ts#L4)
2084
2102
 
2085
2103
  ___
2086
2104
 
@@ -2102,7 +2120,7 @@ val is undefined
2102
2120
 
2103
2121
  #### Defined in
2104
2122
 
2105
- [isUndefined.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isUndefined.ts#L4)
2123
+ [isUndefined.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isUndefined.ts#L4)
2106
2124
 
2107
2125
  ___
2108
2126
 
@@ -2140,7 +2158,7 @@ ___
2140
2158
 
2141
2159
  #### Defined in
2142
2160
 
2143
- [isWeChat.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/isWeChat.ts#L4)
2161
+ [isWeChat.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/isWeChat.ts#L4)
2144
2162
 
2145
2163
  ___
2146
2164
 
@@ -2157,7 +2175,7 @@ https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html
2157
2175
 
2158
2176
  #### Defined in
2159
2177
 
2160
- [isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isWeChatMiniProgram.ts#L5)
2178
+ [isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/isWeChatMiniProgram.ts#L5)
2161
2179
 
2162
2180
  ___
2163
2181
 
@@ -2177,7 +2195,7 @@ ___
2177
2195
 
2178
2196
  #### Defined in
2179
2197
 
2180
- [isWeChat.ts:12](https://github.com/daysnap/utils/blob/721f4a9/src/isWeChat.ts#L12)
2198
+ [isWeChat.ts:12](https://github.com/daysnap/utils/blob/fb256c2/src/isWeChat.ts#L12)
2181
2199
 
2182
2200
  ___
2183
2201
 
@@ -2199,7 +2217,7 @@ val is Window
2199
2217
 
2200
2218
  #### Defined in
2201
2219
 
2202
- [isWindow.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/isWindow.ts#L5)
2220
+ [isWindow.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/isWindow.ts#L5)
2203
2221
 
2204
2222
  ___
2205
2223
 
@@ -2222,7 +2240,7 @@ kebabCase('helloWorld') => hello-world
2222
2240
 
2223
2241
  #### Defined in
2224
2242
 
2225
- [kebabCase.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/kebabCase.ts#L5)
2243
+ [kebabCase.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/kebabCase.ts#L5)
2226
2244
 
2227
2245
  ___
2228
2246
 
@@ -2251,7 +2269,7 @@ list 生成器,快速生成数据
2251
2269
 
2252
2270
  #### Defined in
2253
2271
 
2254
- [listGenerator.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/listGenerator.ts#L5)
2272
+ [listGenerator.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/listGenerator.ts#L5)
2255
2273
 
2256
2274
  ___
2257
2275
 
@@ -2276,7 +2294,7 @@ ___
2276
2294
 
2277
2295
  #### Defined in
2278
2296
 
2279
- [mousewheel.ts:22](https://github.com/daysnap/utils/blob/721f4a9/src/mousewheel.ts#L22)
2297
+ [mousewheel.ts:22](https://github.com/daysnap/utils/blob/fb256c2/src/mousewheel.ts#L22)
2280
2298
 
2281
2299
  ___
2282
2300
 
@@ -2292,7 +2310,7 @@ ___
2292
2310
 
2293
2311
  #### Defined in
2294
2312
 
2295
- [nf.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/nf.ts#L4)
2313
+ [nf.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/nf.ts#L4)
2296
2314
 
2297
2315
  ___
2298
2316
 
@@ -2314,7 +2332,7 @@ ___
2314
2332
 
2315
2333
  #### Defined in
2316
2334
 
2317
- [normalizePath.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/normalizePath.ts#L4)
2335
+ [normalizePath.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/normalizePath.ts#L4)
2318
2336
 
2319
2337
  ___
2320
2338
 
@@ -2344,7 +2362,7 @@ ___
2344
2362
 
2345
2363
  #### Defined in
2346
2364
 
2347
- [omit.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/omit.ts#L4)
2365
+ [omit.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/omit.ts#L4)
2348
2366
 
2349
2367
  ___
2350
2368
 
@@ -2368,7 +2386,7 @@ ___
2368
2386
 
2369
2387
  #### Defined in
2370
2388
 
2371
- [padding.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/padding.ts#L7)
2389
+ [padding.ts:7](https://github.com/daysnap/utils/blob/fb256c2/src/padding.ts#L7)
2372
2390
 
2373
2391
  ___
2374
2392
 
@@ -2390,7 +2408,7 @@ ___
2390
2408
 
2391
2409
  #### Defined in
2392
2410
 
2393
- [parseDate.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/parseDate.ts#L4)
2411
+ [parseDate.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/parseDate.ts#L4)
2394
2412
 
2395
2413
  ___
2396
2414
 
@@ -2413,7 +2431,7 @@ ___
2413
2431
 
2414
2432
  #### Defined in
2415
2433
 
2416
- [parseError.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/parseError.ts#L8)
2434
+ [parseError.ts:8](https://github.com/daysnap/utils/blob/fb256c2/src/parseError.ts#L8)
2417
2435
 
2418
2436
  ___
2419
2437
 
@@ -2443,7 +2461,7 @@ parseObject('a.b.c', 1) => { a: { b: { c: 1 } } }
2443
2461
 
2444
2462
  #### Defined in
2445
2463
 
2446
- [parseObject.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/parseObject.ts#L5)
2464
+ [parseObject.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/parseObject.ts#L5)
2447
2465
 
2448
2466
  ___
2449
2467
 
@@ -2472,7 +2490,7 @@ ___
2472
2490
 
2473
2491
  #### Defined in
2474
2492
 
2475
- [parsePath.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/parsePath.ts#L6)
2493
+ [parsePath.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/parsePath.ts#L6)
2476
2494
 
2477
2495
  ___
2478
2496
 
@@ -2495,7 +2513,7 @@ ___
2495
2513
 
2496
2514
  #### Defined in
2497
2515
 
2498
- [parseQuery.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/parseQuery.ts#L8)
2516
+ [parseQuery.ts:8](https://github.com/daysnap/utils/blob/fb256c2/src/parseQuery.ts#L8)
2499
2517
 
2500
2518
  ___
2501
2519
 
@@ -2525,7 +2543,7 @@ ___
2525
2543
 
2526
2544
  #### Defined in
2527
2545
 
2528
- [parseQueryString.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/parseQueryString.ts#L6)
2546
+ [parseQueryString.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/parseQueryString.ts#L6)
2529
2547
 
2530
2548
  ___
2531
2549
 
@@ -2548,7 +2566,7 @@ pascalCase('hello-world') => HelloWorld
2548
2566
 
2549
2567
  #### Defined in
2550
2568
 
2551
- [pascalCase.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/pascalCase.ts#L8)
2569
+ [pascalCase.ts:8](https://github.com/daysnap/utils/blob/fb256c2/src/pascalCase.ts#L8)
2552
2570
 
2553
2571
  ___
2554
2572
 
@@ -2578,7 +2596,7 @@ ___
2578
2596
 
2579
2597
  #### Defined in
2580
2598
 
2581
- [pick.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/pick.ts#L4)
2599
+ [pick.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/pick.ts#L4)
2582
2600
 
2583
2601
  ___
2584
2602
 
@@ -2601,7 +2619,7 @@ ___
2601
2619
 
2602
2620
  #### Defined in
2603
2621
 
2604
- [replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/replaceCrlf.ts#L4)
2622
+ [replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/replaceCrlf.ts#L4)
2605
2623
 
2606
2624
  ___
2607
2625
 
@@ -2625,7 +2643,7 @@ ___
2625
2643
 
2626
2644
  #### Defined in
2627
2645
 
2628
- [requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/requestFullScreen.ts#L6)
2646
+ [requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/requestFullScreen.ts#L6)
2629
2647
 
2630
2648
  ___
2631
2649
 
@@ -2651,7 +2669,7 @@ reserve(0, '--') => 0
2651
2669
 
2652
2670
  #### Defined in
2653
2671
 
2654
- [reserve.ts:8](https://github.com/daysnap/utils/blob/721f4a9/src/reserve.ts#L8)
2672
+ [reserve.ts:8](https://github.com/daysnap/utils/blob/fb256c2/src/reserve.ts#L8)
2655
2673
 
2656
2674
  ___
2657
2675
 
@@ -2675,7 +2693,7 @@ ___
2675
2693
 
2676
2694
  #### Defined in
2677
2695
 
2678
- [rgbToHex.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/rgbToHex.ts#L4)
2696
+ [rgbToHex.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/rgbToHex.ts#L4)
2679
2697
 
2680
2698
  ___
2681
2699
 
@@ -2698,7 +2716,7 @@ ___
2698
2716
 
2699
2717
  #### Defined in
2700
2718
 
2701
- [round.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/round.ts#L6)
2719
+ [round.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/round.ts#L6)
2702
2720
 
2703
2721
  ___
2704
2722
 
@@ -2714,7 +2732,29 @@ ___
2714
2732
 
2715
2733
  #### Defined in
2716
2734
 
2717
- [scrollToTop.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/scrollToTop.ts#L4)
2735
+ [scrollToTop.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/scrollToTop.ts#L4)
2736
+
2737
+ ___
2738
+
2739
+ ### setScrollTop
2740
+
2741
+ ▸ **setScrollTop**(`scrollTop?`): `void`
2742
+
2743
+ 设置 scrollTop
2744
+
2745
+ #### Parameters
2746
+
2747
+ | Name | Type | Default value |
2748
+ | :------ | :------ | :------ |
2749
+ | `scrollTop` | `number` | `0` |
2750
+
2751
+ #### Returns
2752
+
2753
+ `void`
2754
+
2755
+ #### Defined in
2756
+
2757
+ [setScrollTop.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/setScrollTop.ts#L4)
2718
2758
 
2719
2759
  ___
2720
2760
 
@@ -2737,7 +2777,7 @@ ___
2737
2777
 
2738
2778
  #### Defined in
2739
2779
 
2740
- [sleep.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/sleep.ts#L6)
2780
+ [sleep.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/sleep.ts#L6)
2741
2781
 
2742
2782
  ___
2743
2783
 
@@ -2766,7 +2806,7 @@ ___
2766
2806
 
2767
2807
  #### Defined in
2768
2808
 
2769
- [splitArray.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/splitArray.ts#L4)
2809
+ [splitArray.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/splitArray.ts#L4)
2770
2810
 
2771
2811
  ___
2772
2812
 
@@ -2789,7 +2829,7 @@ ___
2789
2829
 
2790
2830
  #### Defined in
2791
2831
 
2792
- [stringTrim.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/stringTrim.ts#L6)
2832
+ [stringTrim.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/stringTrim.ts#L6)
2793
2833
 
2794
2834
  ___
2795
2835
 
@@ -2811,7 +2851,7 @@ ___
2811
2851
 
2812
2852
  #### Defined in
2813
2853
 
2814
- [stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/721f4a9/src/stringifyQuery.ts#L7)
2854
+ [stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/fb256c2/src/stringifyQuery.ts#L7)
2815
2855
 
2816
2856
  ___
2817
2857
 
@@ -2835,7 +2875,7 @@ ___
2835
2875
 
2836
2876
  #### Defined in
2837
2877
 
2838
- [stringifyQueryString.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/stringifyQueryString.ts#L6)
2878
+ [stringifyQueryString.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/stringifyQueryString.ts#L6)
2839
2879
 
2840
2880
  ___
2841
2881
 
@@ -2879,7 +2919,7 @@ ___
2879
2919
 
2880
2920
  #### Defined in
2881
2921
 
2882
- [throttle.ts:48](https://github.com/daysnap/utils/blob/721f4a9/src/throttle.ts#L48)
2922
+ [throttle.ts:48](https://github.com/daysnap/utils/blob/fb256c2/src/throttle.ts#L48)
2883
2923
 
2884
2924
  ___
2885
2925
 
@@ -2922,7 +2962,7 @@ ___
2922
2962
 
2923
2963
  #### Defined in
2924
2964
 
2925
- [throttle.ts:5](https://github.com/daysnap/utils/blob/721f4a9/src/throttle.ts#L5)
2965
+ [throttle.ts:5](https://github.com/daysnap/utils/blob/fb256c2/src/throttle.ts#L5)
2926
2966
 
2927
2967
  ___
2928
2968
 
@@ -2965,7 +3005,7 @@ ___
2965
3005
 
2966
3006
  #### Defined in
2967
3007
 
2968
- [throttle.ts:25](https://github.com/daysnap/utils/blob/721f4a9/src/throttle.ts#L25)
3008
+ [throttle.ts:25](https://github.com/daysnap/utils/blob/fb256c2/src/throttle.ts#L25)
2969
3009
 
2970
3010
  ___
2971
3011
 
@@ -2987,7 +3027,7 @@ ___
2987
3027
 
2988
3028
  #### Defined in
2989
3029
 
2990
- [toCDB.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/toCDB.ts#L4)
3030
+ [toCDB.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/toCDB.ts#L4)
2991
3031
 
2992
3032
  ___
2993
3033
 
@@ -3009,7 +3049,7 @@ ___
3009
3049
 
3010
3050
  #### Defined in
3011
3051
 
3012
- [toDBC.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/toDBC.ts#L4)
3052
+ [toDBC.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/toDBC.ts#L4)
3013
3053
 
3014
3054
  ___
3015
3055
 
@@ -3033,7 +3073,7 @@ ___
3033
3073
 
3034
3074
  #### Defined in
3035
3075
 
3036
- [typeOf.ts:6](https://github.com/daysnap/utils/blob/721f4a9/src/typeOf.ts#L6)
3076
+ [typeOf.ts:6](https://github.com/daysnap/utils/blob/fb256c2/src/typeOf.ts#L6)
3037
3077
 
3038
3078
  ___
3039
3079
 
@@ -3062,4 +3102,4 @@ ___
3062
3102
 
3063
3103
  #### Defined in
3064
3104
 
3065
- [withPreventConsecutiveClicks.ts:4](https://github.com/daysnap/utils/blob/721f4a9/src/withPreventConsecutiveClicks.ts#L4)
3105
+ [withPreventConsecutiveClicks.ts:4](https://github.com/daysnap/utils/blob/fb256c2/src/withPreventConsecutiveClicks.ts#L4)
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 获取 scrollTop
3
+ */
4
+ export declare function getScrollTop(): number;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 获取 scrollTop
3
+ */
4
+ export function getScrollTop() {
5
+ return (document.documentElement.scrollTop ||
6
+ window.pageYOffset ||
7
+ document.body.scrollTop ||
8
+ 0);
9
+ }
package/es/index.d.ts CHANGED
@@ -38,6 +38,7 @@ export * from './getImageInfo';
38
38
  export * from './getRandom';
39
39
  export * from './getRandomColor';
40
40
  export * from './getRandomNumber';
41
+ export * from './getScrollTop';
41
42
  export * from './getVideoInfo';
42
43
  export * from './inBrowser';
43
44
  export * from './insertLink';
@@ -96,6 +97,7 @@ export * from './reserve';
96
97
  export * from './rgbToHex';
97
98
  export * from './round';
98
99
  export * from './scrollToTop';
100
+ export * from './setScrollTop';
99
101
  export * from './sleep';
100
102
  export * from './splitArray';
101
103
  export * from './storage';
package/es/index.js CHANGED
@@ -39,6 +39,7 @@ export * from './getImageInfo';
39
39
  export * from './getRandom';
40
40
  export * from './getRandomColor';
41
41
  export * from './getRandomNumber';
42
+ export * from './getScrollTop';
42
43
  export * from './getVideoInfo';
43
44
  export * from './inBrowser';
44
45
  export * from './insertLink';
@@ -97,6 +98,7 @@ export * from './reserve';
97
98
  export * from './rgbToHex';
98
99
  export * from './round';
99
100
  export * from './scrollToTop';
101
+ export * from './setScrollTop';
100
102
  export * from './sleep';
101
103
  export * from './splitArray';
102
104
  export * from './storage';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 设置 scrollTop
3
+ */
4
+ export declare function setScrollTop(scrollTop?: number): void;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 设置 scrollTop
3
+ */
4
+ export function setScrollTop(scrollTop = 0) {
5
+ document.documentElement.scrollTop =
6
+ window.pageYOffset =
7
+ document.body.scrollTop =
8
+ scrollTop;
9
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 获取 scrollTop
3
+ */
4
+ export declare function getScrollTop(): number;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getScrollTop = void 0;
4
+ /**
5
+ * 获取 scrollTop
6
+ */
7
+ function getScrollTop() {
8
+ return (document.documentElement.scrollTop ||
9
+ window.pageYOffset ||
10
+ document.body.scrollTop ||
11
+ 0);
12
+ }
13
+ exports.getScrollTop = getScrollTop;
package/lib/index.d.ts CHANGED
@@ -38,6 +38,7 @@ export * from './getImageInfo';
38
38
  export * from './getRandom';
39
39
  export * from './getRandomColor';
40
40
  export * from './getRandomNumber';
41
+ export * from './getScrollTop';
41
42
  export * from './getVideoInfo';
42
43
  export * from './inBrowser';
43
44
  export * from './insertLink';
@@ -96,6 +97,7 @@ export * from './reserve';
96
97
  export * from './rgbToHex';
97
98
  export * from './round';
98
99
  export * from './scrollToTop';
100
+ export * from './setScrollTop';
99
101
  export * from './sleep';
100
102
  export * from './splitArray';
101
103
  export * from './storage';
package/lib/index.js CHANGED
@@ -55,6 +55,7 @@ __exportStar(require("./getImageInfo"), exports);
55
55
  __exportStar(require("./getRandom"), exports);
56
56
  __exportStar(require("./getRandomColor"), exports);
57
57
  __exportStar(require("./getRandomNumber"), exports);
58
+ __exportStar(require("./getScrollTop"), exports);
58
59
  __exportStar(require("./getVideoInfo"), exports);
59
60
  __exportStar(require("./inBrowser"), exports);
60
61
  __exportStar(require("./insertLink"), exports);
@@ -113,6 +114,7 @@ __exportStar(require("./reserve"), exports);
113
114
  __exportStar(require("./rgbToHex"), exports);
114
115
  __exportStar(require("./round"), exports);
115
116
  __exportStar(require("./scrollToTop"), exports);
117
+ __exportStar(require("./setScrollTop"), exports);
116
118
  __exportStar(require("./sleep"), exports);
117
119
  __exportStar(require("./splitArray"), exports);
118
120
  __exportStar(require("./storage"), exports);
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 设置 scrollTop
3
+ */
4
+ export declare function setScrollTop(scrollTop?: number): void;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setScrollTop = void 0;
4
+ /**
5
+ * 设置 scrollTop
6
+ */
7
+ function setScrollTop(scrollTop = 0) {
8
+ document.documentElement.scrollTop =
9
+ window.pageYOffset =
10
+ document.body.scrollTop =
11
+ scrollTop;
12
+ }
13
+ exports.setScrollTop = setScrollTop;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daysnap/utils",
3
- "version": "0.0.88",
3
+ "version": "0.0.89",
4
4
  "description": "通用的工具库",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",