@daysnap/utils 0.0.78 → 0.0.80
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 +254 -111
- package/es/formartDateToZN.js +0 -1
- package/es/throttle.d.ts +11 -1
- package/es/throttle.js +25 -3
- package/es/trap.d.ts +5 -0
- package/es/trap.js +13 -0
- package/lib/formartDateToZN.js +0 -1
- package/lib/throttle.d.ts +11 -1
- package/lib/throttle.js +28 -4
- package/lib/trap.d.ts +5 -0
- package/lib/trap.js +15 -1
- package/package.json +1 -1
package/docs/modules.md
CHANGED
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
- [colorGenByHash](modules.md#colorgenbyhash)
|
|
29
29
|
- [compareVersion](modules.md#compareversion)
|
|
30
30
|
- [compressImage](modules.md#compressimage)
|
|
31
|
+
- [createTrapInstance](modules.md#createtrapinstance)
|
|
31
32
|
- [createWithLoading](modules.md#createwithloading)
|
|
32
33
|
- [debounce](modules.md#debounce)
|
|
33
34
|
- [downloadFile](modules.md#downloadfile)
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
- [formatAmount](modules.md#formatamount)
|
|
46
47
|
- [formatDate](modules.md#formatdate)
|
|
47
48
|
- [formatDateStr](modules.md#formatdatestr)
|
|
49
|
+
- [formatDateToZN](modules.md#formatdatetozn)
|
|
48
50
|
- [formatMessage](modules.md#formatmessage)
|
|
49
51
|
- [formatPathParams](modules.md#formatpathparams)
|
|
50
52
|
- [getBlobByUrl](modules.md#getblobbyurl)
|
|
@@ -117,6 +119,8 @@
|
|
|
117
119
|
- [stringTrim](modules.md#stringtrim)
|
|
118
120
|
- [stringifyQuery](modules.md#stringifyquery)
|
|
119
121
|
- [throttle](modules.md#throttle)
|
|
122
|
+
- [throttleLeading](modules.md#throttleleading)
|
|
123
|
+
- [throttleTrailing](modules.md#throttletrailing)
|
|
120
124
|
- [toCDB](modules.md#tocdb)
|
|
121
125
|
- [toDBC](modules.md#todbc)
|
|
122
126
|
- [typeOf](modules.md#typeof)
|
|
@@ -129,7 +133,7 @@
|
|
|
129
133
|
|
|
130
134
|
#### Defined in
|
|
131
135
|
|
|
132
|
-
[trap.ts:15](https://github.com/daysnap/utils/blob/
|
|
136
|
+
[trap.ts:15](https://github.com/daysnap/utils/blob/867c3c9/src/trap.ts#L15)
|
|
133
137
|
|
|
134
138
|
## Functions
|
|
135
139
|
|
|
@@ -167,7 +171,7 @@ res = { '1': '男', '2': '女' }
|
|
|
167
171
|
|
|
168
172
|
#### Defined in
|
|
169
173
|
|
|
170
|
-
[ato.ts:12](https://github.com/daysnap/utils/blob/
|
|
174
|
+
[ato.ts:12](https://github.com/daysnap/utils/blob/867c3c9/src/ato.ts#L12)
|
|
171
175
|
|
|
172
176
|
▸ **ato**<`T`, `K`\>(`options`, `labelKey`, `valueKey`): `Record`<`T`[`K`], `any`\>
|
|
173
177
|
|
|
@@ -192,7 +196,7 @@ res = { '1': '男', '2': '女' }
|
|
|
192
196
|
|
|
193
197
|
#### Defined in
|
|
194
198
|
|
|
195
|
-
[ato.ts:16](https://github.com/daysnap/utils/blob/
|
|
199
|
+
[ato.ts:16](https://github.com/daysnap/utils/blob/867c3c9/src/ato.ts#L16)
|
|
196
200
|
|
|
197
201
|
___
|
|
198
202
|
|
|
@@ -215,7 +219,7 @@ base64 转 blob
|
|
|
215
219
|
|
|
216
220
|
#### Defined in
|
|
217
221
|
|
|
218
|
-
[base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/
|
|
222
|
+
[base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/base64ToBlob.ts#L6)
|
|
219
223
|
|
|
220
224
|
___
|
|
221
225
|
|
|
@@ -237,7 +241,7 @@ blob 转 base64
|
|
|
237
241
|
|
|
238
242
|
#### Defined in
|
|
239
243
|
|
|
240
|
-
[blobToBase64.ts:4](https://github.com/daysnap/utils/blob/
|
|
244
|
+
[blobToBase64.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/blobToBase64.ts#L4)
|
|
241
245
|
|
|
242
246
|
___
|
|
243
247
|
|
|
@@ -278,7 +282,7 @@ ___
|
|
|
278
282
|
|
|
279
283
|
#### Defined in
|
|
280
284
|
|
|
281
|
-
[cached.ts:5](https://github.com/daysnap/utils/blob/
|
|
285
|
+
[cached.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/cached.ts#L5)
|
|
282
286
|
|
|
283
287
|
___
|
|
284
288
|
|
|
@@ -301,7 +305,7 @@ camelCase('hello-world') => helloWorld
|
|
|
301
305
|
|
|
302
306
|
#### Defined in
|
|
303
307
|
|
|
304
|
-
[camelCase.ts:5](https://github.com/daysnap/utils/blob/
|
|
308
|
+
[camelCase.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/camelCase.ts#L5)
|
|
305
309
|
|
|
306
310
|
___
|
|
307
311
|
|
|
@@ -325,7 +329,7 @@ canvas 转 blob 文件
|
|
|
325
329
|
|
|
326
330
|
#### Defined in
|
|
327
331
|
|
|
328
|
-
[canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/
|
|
332
|
+
[canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/canvasToBlob.ts#L4)
|
|
329
333
|
|
|
330
334
|
___
|
|
331
335
|
|
|
@@ -348,7 +352,7 @@ capitalize('hello world') => Hello world
|
|
|
348
352
|
|
|
349
353
|
#### Defined in
|
|
350
354
|
|
|
351
|
-
[capitalize.ts:5](https://github.com/daysnap/utils/blob/
|
|
355
|
+
[capitalize.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/capitalize.ts#L5)
|
|
352
356
|
|
|
353
357
|
___
|
|
354
358
|
|
|
@@ -372,7 +376,7 @@ ___
|
|
|
372
376
|
|
|
373
377
|
#### Defined in
|
|
374
378
|
|
|
375
|
-
[clamp.ts:7](https://github.com/daysnap/utils/blob/
|
|
379
|
+
[clamp.ts:7](https://github.com/daysnap/utils/blob/867c3c9/src/clamp.ts#L7)
|
|
376
380
|
|
|
377
381
|
___
|
|
378
382
|
|
|
@@ -400,7 +404,7 @@ ___
|
|
|
400
404
|
|
|
401
405
|
#### Defined in
|
|
402
406
|
|
|
403
|
-
[clone.ts:8](https://github.com/daysnap/utils/blob/
|
|
407
|
+
[clone.ts:8](https://github.com/daysnap/utils/blob/867c3c9/src/clone.ts#L8)
|
|
404
408
|
|
|
405
409
|
___
|
|
406
410
|
|
|
@@ -428,7 +432,7 @@ ___
|
|
|
428
432
|
|
|
429
433
|
#### Defined in
|
|
430
434
|
|
|
431
|
-
[cloneSimple.ts:7](https://github.com/daysnap/utils/blob/
|
|
435
|
+
[cloneSimple.ts:7](https://github.com/daysnap/utils/blob/867c3c9/src/cloneSimple.ts#L7)
|
|
432
436
|
|
|
433
437
|
___
|
|
434
438
|
|
|
@@ -450,7 +454,7 @@ ___
|
|
|
450
454
|
|
|
451
455
|
#### Defined in
|
|
452
456
|
|
|
453
|
-
[createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/
|
|
457
|
+
[createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/createHexColorByHash.ts#L4)
|
|
454
458
|
|
|
455
459
|
___
|
|
456
460
|
|
|
@@ -476,7 +480,7 @@ ___
|
|
|
476
480
|
|
|
477
481
|
#### Defined in
|
|
478
482
|
|
|
479
|
-
[compareVersion.ts:9](https://github.com/daysnap/utils/blob/
|
|
483
|
+
[compareVersion.ts:9](https://github.com/daysnap/utils/blob/867c3c9/src/compareVersion.ts#L9)
|
|
480
484
|
|
|
481
485
|
___
|
|
482
486
|
|
|
@@ -498,7 +502,39 @@ ___
|
|
|
498
502
|
|
|
499
503
|
#### Defined in
|
|
500
504
|
|
|
501
|
-
[compressImage.ts:6](https://github.com/daysnap/utils/blob/
|
|
505
|
+
[compressImage.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/compressImage.ts#L6)
|
|
506
|
+
|
|
507
|
+
___
|
|
508
|
+
|
|
509
|
+
### createTrapInstance
|
|
510
|
+
|
|
511
|
+
▸ **createTrapInstance**<`T`\>(`id`): `Object`
|
|
512
|
+
|
|
513
|
+
#### Type parameters
|
|
514
|
+
|
|
515
|
+
| Name | Type |
|
|
516
|
+
| :------ | :------ |
|
|
517
|
+
| `T` | `any` |
|
|
518
|
+
|
|
519
|
+
#### Parameters
|
|
520
|
+
|
|
521
|
+
| Name | Type |
|
|
522
|
+
| :------ | :------ |
|
|
523
|
+
| `id` | `string` |
|
|
524
|
+
|
|
525
|
+
#### Returns
|
|
526
|
+
|
|
527
|
+
`Object`
|
|
528
|
+
|
|
529
|
+
| Name | Type |
|
|
530
|
+
| :------ | :------ |
|
|
531
|
+
| `create` | (`cb`: (`data`: `T`) => `void`) => `void` |
|
|
532
|
+
| `delete` | () => `void` |
|
|
533
|
+
| `trigger` | (`data?`: `T`) => `void` |
|
|
534
|
+
|
|
535
|
+
#### Defined in
|
|
536
|
+
|
|
537
|
+
[trap.ts:49](https://github.com/daysnap/utils/blob/867c3c9/src/trap.ts#L49)
|
|
502
538
|
|
|
503
539
|
___
|
|
504
540
|
|
|
@@ -561,7 +597,7 @@ fn() 执行的时候就会执行showLoading
|
|
|
561
597
|
|
|
562
598
|
#### Defined in
|
|
563
599
|
|
|
564
|
-
[createWithLoading.ts:9](https://github.com/daysnap/utils/blob/
|
|
600
|
+
[createWithLoading.ts:9](https://github.com/daysnap/utils/blob/867c3c9/src/createWithLoading.ts#L9)
|
|
565
601
|
|
|
566
602
|
___
|
|
567
603
|
|
|
@@ -604,7 +640,7 @@ ___
|
|
|
604
640
|
|
|
605
641
|
#### Defined in
|
|
606
642
|
|
|
607
|
-
[debounce.ts:5](https://github.com/daysnap/utils/blob/
|
|
643
|
+
[debounce.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/debounce.ts#L5)
|
|
608
644
|
|
|
609
645
|
___
|
|
610
646
|
|
|
@@ -628,7 +664,7 @@ ___
|
|
|
628
664
|
|
|
629
665
|
#### Defined in
|
|
630
666
|
|
|
631
|
-
[downloadFile.ts:4](https://github.com/daysnap/utils/blob/
|
|
667
|
+
[downloadFile.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/downloadFile.ts#L4)
|
|
632
668
|
|
|
633
669
|
___
|
|
634
670
|
|
|
@@ -657,7 +693,7 @@ ___
|
|
|
657
693
|
|
|
658
694
|
#### Defined in
|
|
659
695
|
|
|
660
|
-
[each.ts:4](https://github.com/daysnap/utils/blob/
|
|
696
|
+
[each.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/each.ts#L4)
|
|
661
697
|
|
|
662
698
|
▸ **each**<`T`\>(`data`, `callback`): `void`
|
|
663
699
|
|
|
@@ -680,7 +716,7 @@ ___
|
|
|
680
716
|
|
|
681
717
|
#### Defined in
|
|
682
718
|
|
|
683
|
-
[each.ts:8](https://github.com/daysnap/utils/blob/
|
|
719
|
+
[each.ts:8](https://github.com/daysnap/utils/blob/867c3c9/src/each.ts#L8)
|
|
684
720
|
|
|
685
721
|
___
|
|
686
722
|
|
|
@@ -698,7 +734,7 @@ ___
|
|
|
698
734
|
|
|
699
735
|
#### Defined in
|
|
700
736
|
|
|
701
|
-
[exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/
|
|
737
|
+
[exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/exitFullscreen.ts#L6)
|
|
702
738
|
|
|
703
739
|
___
|
|
704
740
|
|
|
@@ -727,7 +763,7 @@ ___
|
|
|
727
763
|
|
|
728
764
|
#### Defined in
|
|
729
765
|
|
|
730
|
-
[storage/factory.ts:8](https://github.com/daysnap/utils/blob/
|
|
766
|
+
[storage/factory.ts:8](https://github.com/daysnap/utils/blob/867c3c9/src/storage/factory.ts#L8)
|
|
731
767
|
|
|
732
768
|
___
|
|
733
769
|
|
|
@@ -749,7 +785,7 @@ ___
|
|
|
749
785
|
|
|
750
786
|
#### Defined in
|
|
751
787
|
|
|
752
|
-
[filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/
|
|
788
|
+
[filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/filterBankCardNo.ts#L4)
|
|
753
789
|
|
|
754
790
|
___
|
|
755
791
|
|
|
@@ -771,7 +807,7 @@ ___
|
|
|
771
807
|
|
|
772
808
|
#### Defined in
|
|
773
809
|
|
|
774
|
-
[filterCRLF.ts:4](https://github.com/daysnap/utils/blob/
|
|
810
|
+
[filterCRLF.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/filterCRLF.ts#L4)
|
|
775
811
|
|
|
776
812
|
___
|
|
777
813
|
|
|
@@ -793,7 +829,7 @@ ___
|
|
|
793
829
|
|
|
794
830
|
#### Defined in
|
|
795
831
|
|
|
796
|
-
[filterEmoji.ts:4](https://github.com/daysnap/utils/blob/
|
|
832
|
+
[filterEmoji.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/filterEmoji.ts#L4)
|
|
797
833
|
|
|
798
834
|
___
|
|
799
835
|
|
|
@@ -816,7 +852,7 @@ ___
|
|
|
816
852
|
|
|
817
853
|
#### Defined in
|
|
818
854
|
|
|
819
|
-
[filterEmptyValue.ts:12](https://github.com/daysnap/utils/blob/
|
|
855
|
+
[filterEmptyValue.ts:12](https://github.com/daysnap/utils/blob/867c3c9/src/filterEmptyValue.ts#L12)
|
|
820
856
|
|
|
821
857
|
___
|
|
822
858
|
|
|
@@ -839,7 +875,7 @@ ___
|
|
|
839
875
|
|
|
840
876
|
#### Defined in
|
|
841
877
|
|
|
842
|
-
[filterIdCard.ts:5](https://github.com/daysnap/utils/blob/
|
|
878
|
+
[filterIdCard.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/filterIdCard.ts#L5)
|
|
843
879
|
|
|
844
880
|
___
|
|
845
881
|
|
|
@@ -861,7 +897,7 @@ ___
|
|
|
861
897
|
|
|
862
898
|
#### Defined in
|
|
863
899
|
|
|
864
|
-
[filterName.ts:4](https://github.com/daysnap/utils/blob/
|
|
900
|
+
[filterName.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/filterName.ts#L4)
|
|
865
901
|
|
|
866
902
|
___
|
|
867
903
|
|
|
@@ -886,7 +922,7 @@ filterPhone('13177778888', ' ') => 131 **** 8888
|
|
|
886
922
|
|
|
887
923
|
#### Defined in
|
|
888
924
|
|
|
889
|
-
[filterPhone.ts:6](https://github.com/daysnap/utils/blob/
|
|
925
|
+
[filterPhone.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/filterPhone.ts#L6)
|
|
890
926
|
|
|
891
927
|
___
|
|
892
928
|
|
|
@@ -913,7 +949,7 @@ str = '131****8888'
|
|
|
913
949
|
|
|
914
950
|
#### Defined in
|
|
915
951
|
|
|
916
|
-
[filterString.ts:6](https://github.com/daysnap/utils/blob/
|
|
952
|
+
[filterString.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/filterString.ts#L6)
|
|
917
953
|
|
|
918
954
|
___
|
|
919
955
|
|
|
@@ -936,7 +972,7 @@ ___
|
|
|
936
972
|
|
|
937
973
|
#### Defined in
|
|
938
974
|
|
|
939
|
-
[formatAmount.ts:4](https://github.com/daysnap/utils/blob/
|
|
975
|
+
[formatAmount.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/formatAmount.ts#L4)
|
|
940
976
|
|
|
941
977
|
___
|
|
942
978
|
|
|
@@ -960,7 +996,7 @@ ___
|
|
|
960
996
|
|
|
961
997
|
#### Defined in
|
|
962
998
|
|
|
963
|
-
[formatDate.ts:8](https://github.com/daysnap/utils/blob/
|
|
999
|
+
[formatDate.ts:8](https://github.com/daysnap/utils/blob/867c3c9/src/formatDate.ts#L8)
|
|
964
1000
|
|
|
965
1001
|
___
|
|
966
1002
|
|
|
@@ -983,7 +1019,27 @@ fix iOS 日期时间格式如果是 - 就会报错的问题
|
|
|
983
1019
|
|
|
984
1020
|
#### Defined in
|
|
985
1021
|
|
|
986
|
-
[formatDateStr.ts:5](https://github.com/daysnap/utils/blob/
|
|
1022
|
+
[formatDateStr.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/formatDateStr.ts#L5)
|
|
1023
|
+
|
|
1024
|
+
___
|
|
1025
|
+
|
|
1026
|
+
### formatDateToZN
|
|
1027
|
+
|
|
1028
|
+
▸ **formatDateToZN**(`v`): `string`
|
|
1029
|
+
|
|
1030
|
+
#### Parameters
|
|
1031
|
+
|
|
1032
|
+
| Name | Type |
|
|
1033
|
+
| :------ | :------ |
|
|
1034
|
+
| `v` | `string` \| `number` |
|
|
1035
|
+
|
|
1036
|
+
#### Returns
|
|
1037
|
+
|
|
1038
|
+
`string`
|
|
1039
|
+
|
|
1040
|
+
#### Defined in
|
|
1041
|
+
|
|
1042
|
+
[formartDateToZN.ts:3](https://github.com/daysnap/utils/blob/867c3c9/src/formartDateToZN.ts#L3)
|
|
987
1043
|
|
|
988
1044
|
___
|
|
989
1045
|
|
|
@@ -1008,7 +1064,7 @@ formatMessage({ a: '123', b: { ba: '456' } }, ['b.ba']) => '456'
|
|
|
1008
1064
|
|
|
1009
1065
|
#### Defined in
|
|
1010
1066
|
|
|
1011
|
-
[formatMessage.ts:11](https://github.com/daysnap/utils/blob/
|
|
1067
|
+
[formatMessage.ts:11](https://github.com/daysnap/utils/blob/867c3c9/src/formatMessage.ts#L11)
|
|
1012
1068
|
|
|
1013
1069
|
___
|
|
1014
1070
|
|
|
@@ -1040,7 +1096,7 @@ rest = { xxx: 1 }
|
|
|
1040
1096
|
|
|
1041
1097
|
#### Defined in
|
|
1042
1098
|
|
|
1043
|
-
[formatPathParams.ts:8](https://github.com/daysnap/utils/blob/
|
|
1099
|
+
[formatPathParams.ts:8](https://github.com/daysnap/utils/blob/867c3c9/src/formatPathParams.ts#L8)
|
|
1044
1100
|
|
|
1045
1101
|
___
|
|
1046
1102
|
|
|
@@ -1062,7 +1118,7 @@ ___
|
|
|
1062
1118
|
|
|
1063
1119
|
#### Defined in
|
|
1064
1120
|
|
|
1065
|
-
[getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/
|
|
1121
|
+
[getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/getBlobByUrl.ts#L4)
|
|
1066
1122
|
|
|
1067
1123
|
___
|
|
1068
1124
|
|
|
@@ -1085,7 +1141,7 @@ ___
|
|
|
1085
1141
|
|
|
1086
1142
|
#### Defined in
|
|
1087
1143
|
|
|
1088
|
-
[storage/index.ts:9](https://github.com/daysnap/utils/blob/
|
|
1144
|
+
[storage/index.ts:9](https://github.com/daysnap/utils/blob/867c3c9/src/storage/index.ts#L9)
|
|
1089
1145
|
|
|
1090
1146
|
___
|
|
1091
1147
|
|
|
@@ -1107,7 +1163,7 @@ ___
|
|
|
1107
1163
|
|
|
1108
1164
|
#### Defined in
|
|
1109
1165
|
|
|
1110
|
-
[getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/
|
|
1166
|
+
[getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/getDayMillisecond.ts#L4)
|
|
1111
1167
|
|
|
1112
1168
|
___
|
|
1113
1169
|
|
|
@@ -1129,7 +1185,7 @@ ___
|
|
|
1129
1185
|
|
|
1130
1186
|
#### Defined in
|
|
1131
1187
|
|
|
1132
|
-
[getImageInfo.ts:4](https://github.com/daysnap/utils/blob/
|
|
1188
|
+
[getImageInfo.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/getImageInfo.ts#L4)
|
|
1133
1189
|
|
|
1134
1190
|
___
|
|
1135
1191
|
|
|
@@ -1152,7 +1208,7 @@ ___
|
|
|
1152
1208
|
|
|
1153
1209
|
#### Defined in
|
|
1154
1210
|
|
|
1155
|
-
[storage/index.ts:9](https://github.com/daysnap/utils/blob/
|
|
1211
|
+
[storage/index.ts:9](https://github.com/daysnap/utils/blob/867c3c9/src/storage/index.ts#L9)
|
|
1156
1212
|
|
|
1157
1213
|
___
|
|
1158
1214
|
|
|
@@ -1175,7 +1231,7 @@ ___
|
|
|
1175
1231
|
|
|
1176
1232
|
#### Defined in
|
|
1177
1233
|
|
|
1178
|
-
[getRandom.ts:7](https://github.com/daysnap/utils/blob/
|
|
1234
|
+
[getRandom.ts:7](https://github.com/daysnap/utils/blob/867c3c9/src/getRandom.ts#L7)
|
|
1179
1235
|
|
|
1180
1236
|
___
|
|
1181
1237
|
|
|
@@ -1191,7 +1247,7 @@ ___
|
|
|
1191
1247
|
|
|
1192
1248
|
#### Defined in
|
|
1193
1249
|
|
|
1194
|
-
[getRandomColor.ts:4](https://github.com/daysnap/utils/blob/
|
|
1250
|
+
[getRandomColor.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/getRandomColor.ts#L4)
|
|
1195
1251
|
|
|
1196
1252
|
___
|
|
1197
1253
|
|
|
@@ -1213,7 +1269,7 @@ ___
|
|
|
1213
1269
|
|
|
1214
1270
|
#### Defined in
|
|
1215
1271
|
|
|
1216
|
-
[getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/
|
|
1272
|
+
[getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/867c3c9/src/getRandomNumber.ts#L7)
|
|
1217
1273
|
|
|
1218
1274
|
___
|
|
1219
1275
|
|
|
@@ -1235,7 +1291,7 @@ ___
|
|
|
1235
1291
|
|
|
1236
1292
|
#### Defined in
|
|
1237
1293
|
|
|
1238
|
-
[getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/
|
|
1294
|
+
[getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/getVideoInfo.ts#L4)
|
|
1239
1295
|
|
|
1240
1296
|
___
|
|
1241
1297
|
|
|
@@ -1251,7 +1307,7 @@ ___
|
|
|
1251
1307
|
|
|
1252
1308
|
#### Defined in
|
|
1253
1309
|
|
|
1254
|
-
[inBrowser.ts:4](https://github.com/daysnap/utils/blob/
|
|
1310
|
+
[inBrowser.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/inBrowser.ts#L4)
|
|
1255
1311
|
|
|
1256
1312
|
___
|
|
1257
1313
|
|
|
@@ -1273,7 +1329,7 @@ ___
|
|
|
1273
1329
|
|
|
1274
1330
|
#### Defined in
|
|
1275
1331
|
|
|
1276
|
-
[insertLink.ts:4](https://github.com/daysnap/utils/blob/
|
|
1332
|
+
[insertLink.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/insertLink.ts#L4)
|
|
1277
1333
|
|
|
1278
1334
|
▸ **insertLink**(`href`, `callback`): `void`
|
|
1279
1335
|
|
|
@@ -1290,7 +1346,7 @@ ___
|
|
|
1290
1346
|
|
|
1291
1347
|
#### Defined in
|
|
1292
1348
|
|
|
1293
|
-
[insertLink.ts:5](https://github.com/daysnap/utils/blob/
|
|
1349
|
+
[insertLink.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/insertLink.ts#L5)
|
|
1294
1350
|
|
|
1295
1351
|
___
|
|
1296
1352
|
|
|
@@ -1312,7 +1368,7 @@ ___
|
|
|
1312
1368
|
|
|
1313
1369
|
#### Defined in
|
|
1314
1370
|
|
|
1315
|
-
[insertScript.ts:4](https://github.com/daysnap/utils/blob/
|
|
1371
|
+
[insertScript.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/insertScript.ts#L4)
|
|
1316
1372
|
|
|
1317
1373
|
▸ **insertScript**(`src`, `callback`): `void`
|
|
1318
1374
|
|
|
@@ -1329,7 +1385,7 @@ ___
|
|
|
1329
1385
|
|
|
1330
1386
|
#### Defined in
|
|
1331
1387
|
|
|
1332
|
-
[insertScript.ts:5](https://github.com/daysnap/utils/blob/
|
|
1388
|
+
[insertScript.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/insertScript.ts#L5)
|
|
1333
1389
|
|
|
1334
1390
|
___
|
|
1335
1391
|
|
|
@@ -1351,7 +1407,7 @@ ___
|
|
|
1351
1407
|
|
|
1352
1408
|
#### Defined in
|
|
1353
1409
|
|
|
1354
|
-
[insertStyle.ts:4](https://github.com/daysnap/utils/blob/
|
|
1410
|
+
[insertStyle.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/insertStyle.ts#L4)
|
|
1355
1411
|
|
|
1356
1412
|
___
|
|
1357
1413
|
|
|
@@ -1380,7 +1436,7 @@ isAmount('1.123') => false
|
|
|
1380
1436
|
|
|
1381
1437
|
#### Defined in
|
|
1382
1438
|
|
|
1383
|
-
[isAmount.ts:11](https://github.com/daysnap/utils/blob/
|
|
1439
|
+
[isAmount.ts:11](https://github.com/daysnap/utils/blob/867c3c9/src/isAmount.ts#L11)
|
|
1384
1440
|
|
|
1385
1441
|
___
|
|
1386
1442
|
|
|
@@ -1396,7 +1452,7 @@ ___
|
|
|
1396
1452
|
|
|
1397
1453
|
#### Defined in
|
|
1398
1454
|
|
|
1399
|
-
[isAndroid.ts:4](https://github.com/daysnap/utils/blob/
|
|
1455
|
+
[isAndroid.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isAndroid.ts#L4)
|
|
1400
1456
|
|
|
1401
1457
|
___
|
|
1402
1458
|
|
|
@@ -1420,7 +1476,7 @@ val is any[]
|
|
|
1420
1476
|
|
|
1421
1477
|
#### Defined in
|
|
1422
1478
|
|
|
1423
|
-
[isArray.ts:6](https://github.com/daysnap/utils/blob/
|
|
1479
|
+
[isArray.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/isArray.ts#L6)
|
|
1424
1480
|
|
|
1425
1481
|
___
|
|
1426
1482
|
|
|
@@ -1442,7 +1498,7 @@ val is boolean
|
|
|
1442
1498
|
|
|
1443
1499
|
#### Defined in
|
|
1444
1500
|
|
|
1445
|
-
[isBoolean.ts:5](https://github.com/daysnap/utils/blob/
|
|
1501
|
+
[isBoolean.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/isBoolean.ts#L5)
|
|
1446
1502
|
|
|
1447
1503
|
___
|
|
1448
1504
|
|
|
@@ -1464,7 +1520,7 @@ ___
|
|
|
1464
1520
|
|
|
1465
1521
|
#### Defined in
|
|
1466
1522
|
|
|
1467
|
-
[isChinese.ts:4](https://github.com/daysnap/utils/blob/
|
|
1523
|
+
[isChinese.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isChinese.ts#L4)
|
|
1468
1524
|
|
|
1469
1525
|
___
|
|
1470
1526
|
|
|
@@ -1486,7 +1542,7 @@ val is Date
|
|
|
1486
1542
|
|
|
1487
1543
|
#### Defined in
|
|
1488
1544
|
|
|
1489
|
-
[isDate.ts:4](https://github.com/daysnap/utils/blob/
|
|
1545
|
+
[isDate.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isDate.ts#L4)
|
|
1490
1546
|
|
|
1491
1547
|
___
|
|
1492
1548
|
|
|
@@ -1508,7 +1564,7 @@ ___
|
|
|
1508
1564
|
|
|
1509
1565
|
#### Defined in
|
|
1510
1566
|
|
|
1511
|
-
[isEmail.ts:4](https://github.com/daysnap/utils/blob/
|
|
1567
|
+
[isEmail.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isEmail.ts#L4)
|
|
1512
1568
|
|
|
1513
1569
|
___
|
|
1514
1570
|
|
|
@@ -1530,7 +1586,7 @@ ___
|
|
|
1530
1586
|
|
|
1531
1587
|
#### Defined in
|
|
1532
1588
|
|
|
1533
|
-
[isEmpty.ts:6](https://github.com/daysnap/utils/blob/
|
|
1589
|
+
[isEmpty.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/isEmpty.ts#L6)
|
|
1534
1590
|
|
|
1535
1591
|
___
|
|
1536
1592
|
|
|
@@ -1552,7 +1608,7 @@ ___
|
|
|
1552
1608
|
|
|
1553
1609
|
#### Defined in
|
|
1554
1610
|
|
|
1555
|
-
[isEmptyArray.ts:6](https://github.com/daysnap/utils/blob/
|
|
1611
|
+
[isEmptyArray.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/isEmptyArray.ts#L6)
|
|
1556
1612
|
|
|
1557
1613
|
___
|
|
1558
1614
|
|
|
@@ -1574,7 +1630,7 @@ ___
|
|
|
1574
1630
|
|
|
1575
1631
|
#### Defined in
|
|
1576
1632
|
|
|
1577
|
-
[isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/
|
|
1633
|
+
[isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/isEmptyObject.ts#L5)
|
|
1578
1634
|
|
|
1579
1635
|
___
|
|
1580
1636
|
|
|
@@ -1596,7 +1652,7 @@ val is Error
|
|
|
1596
1652
|
|
|
1597
1653
|
#### Defined in
|
|
1598
1654
|
|
|
1599
|
-
[isError.ts:4](https://github.com/daysnap/utils/blob/
|
|
1655
|
+
[isError.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isError.ts#L4)
|
|
1600
1656
|
|
|
1601
1657
|
___
|
|
1602
1658
|
|
|
@@ -1618,7 +1674,7 @@ val is Function
|
|
|
1618
1674
|
|
|
1619
1675
|
#### Defined in
|
|
1620
1676
|
|
|
1621
|
-
[isFunction.ts:4](https://github.com/daysnap/utils/blob/
|
|
1677
|
+
[isFunction.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isFunction.ts#L4)
|
|
1622
1678
|
|
|
1623
1679
|
___
|
|
1624
1680
|
|
|
@@ -1636,7 +1692,7 @@ ___
|
|
|
1636
1692
|
|
|
1637
1693
|
#### Defined in
|
|
1638
1694
|
|
|
1639
|
-
[isIE.ts:6](https://github.com/daysnap/utils/blob/
|
|
1695
|
+
[isIE.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/isIE.ts#L6)
|
|
1640
1696
|
|
|
1641
1697
|
___
|
|
1642
1698
|
|
|
@@ -1652,7 +1708,7 @@ ___
|
|
|
1652
1708
|
|
|
1653
1709
|
#### Defined in
|
|
1654
1710
|
|
|
1655
|
-
[isIOS.ts:4](https://github.com/daysnap/utils/blob/
|
|
1711
|
+
[isIOS.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isIOS.ts#L4)
|
|
1656
1712
|
|
|
1657
1713
|
___
|
|
1658
1714
|
|
|
@@ -1674,7 +1730,7 @@ ___
|
|
|
1674
1730
|
|
|
1675
1731
|
#### Defined in
|
|
1676
1732
|
|
|
1677
|
-
[isIdCard.ts:4](https://github.com/daysnap/utils/blob/
|
|
1733
|
+
[isIdCard.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isIdCard.ts#L4)
|
|
1678
1734
|
|
|
1679
1735
|
___
|
|
1680
1736
|
|
|
@@ -1696,7 +1752,7 @@ ___
|
|
|
1696
1752
|
|
|
1697
1753
|
#### Defined in
|
|
1698
1754
|
|
|
1699
|
-
[isJSONString.ts:7](https://github.com/daysnap/utils/blob/
|
|
1755
|
+
[isJSONString.ts:7](https://github.com/daysnap/utils/blob/867c3c9/src/isJSONString.ts#L7)
|
|
1700
1756
|
|
|
1701
1757
|
___
|
|
1702
1758
|
|
|
@@ -1718,7 +1774,7 @@ ___
|
|
|
1718
1774
|
|
|
1719
1775
|
#### Defined in
|
|
1720
1776
|
|
|
1721
|
-
[isLan.ts:5](https://github.com/daysnap/utils/blob/
|
|
1777
|
+
[isLan.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/isLan.ts#L5)
|
|
1722
1778
|
|
|
1723
1779
|
___
|
|
1724
1780
|
|
|
@@ -1740,7 +1796,7 @@ ___
|
|
|
1740
1796
|
|
|
1741
1797
|
#### Defined in
|
|
1742
1798
|
|
|
1743
|
-
[isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/
|
|
1799
|
+
[isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/isLicenseCode.ts#L5)
|
|
1744
1800
|
|
|
1745
1801
|
___
|
|
1746
1802
|
|
|
@@ -1756,7 +1812,7 @@ ___
|
|
|
1756
1812
|
|
|
1757
1813
|
#### Defined in
|
|
1758
1814
|
|
|
1759
|
-
[isMobile.ts:4](https://github.com/daysnap/utils/blob/
|
|
1815
|
+
[isMobile.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isMobile.ts#L4)
|
|
1760
1816
|
|
|
1761
1817
|
___
|
|
1762
1818
|
|
|
@@ -1779,7 +1835,7 @@ ___
|
|
|
1779
1835
|
|
|
1780
1836
|
#### Defined in
|
|
1781
1837
|
|
|
1782
|
-
[isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/
|
|
1838
|
+
[isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/867c3c9/src/isNativeFunction.ts#L7)
|
|
1783
1839
|
|
|
1784
1840
|
___
|
|
1785
1841
|
|
|
@@ -1801,7 +1857,7 @@ val is null
|
|
|
1801
1857
|
|
|
1802
1858
|
#### Defined in
|
|
1803
1859
|
|
|
1804
|
-
[isNull.ts:4](https://github.com/daysnap/utils/blob/
|
|
1860
|
+
[isNull.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isNull.ts#L4)
|
|
1805
1861
|
|
|
1806
1862
|
___
|
|
1807
1863
|
|
|
@@ -1823,7 +1879,7 @@ val is number
|
|
|
1823
1879
|
|
|
1824
1880
|
#### Defined in
|
|
1825
1881
|
|
|
1826
|
-
[isNumber.ts:5](https://github.com/daysnap/utils/blob/
|
|
1882
|
+
[isNumber.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/isNumber.ts#L5)
|
|
1827
1883
|
|
|
1828
1884
|
___
|
|
1829
1885
|
|
|
@@ -1845,7 +1901,7 @@ val is Record<string, any\>
|
|
|
1845
1901
|
|
|
1846
1902
|
#### Defined in
|
|
1847
1903
|
|
|
1848
|
-
[isObject.ts:4](https://github.com/daysnap/utils/blob/
|
|
1904
|
+
[isObject.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isObject.ts#L4)
|
|
1849
1905
|
|
|
1850
1906
|
___
|
|
1851
1907
|
|
|
@@ -1867,7 +1923,7 @@ ___
|
|
|
1867
1923
|
|
|
1868
1924
|
#### Defined in
|
|
1869
1925
|
|
|
1870
|
-
[isPhone.ts:4](https://github.com/daysnap/utils/blob/
|
|
1926
|
+
[isPhone.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isPhone.ts#L4)
|
|
1871
1927
|
|
|
1872
1928
|
___
|
|
1873
1929
|
|
|
@@ -1895,7 +1951,7 @@ val is Promise<T\>
|
|
|
1895
1951
|
|
|
1896
1952
|
#### Defined in
|
|
1897
1953
|
|
|
1898
|
-
[isPromise.ts:4](https://github.com/daysnap/utils/blob/
|
|
1954
|
+
[isPromise.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isPromise.ts#L4)
|
|
1899
1955
|
|
|
1900
1956
|
___
|
|
1901
1957
|
|
|
@@ -1917,7 +1973,7 @@ val is RegExp
|
|
|
1917
1973
|
|
|
1918
1974
|
#### Defined in
|
|
1919
1975
|
|
|
1920
|
-
[isRegExp.ts:4](https://github.com/daysnap/utils/blob/
|
|
1976
|
+
[isRegExp.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isRegExp.ts#L4)
|
|
1921
1977
|
|
|
1922
1978
|
___
|
|
1923
1979
|
|
|
@@ -1939,7 +1995,7 @@ val is string
|
|
|
1939
1995
|
|
|
1940
1996
|
#### Defined in
|
|
1941
1997
|
|
|
1942
|
-
[isString.ts:4](https://github.com/daysnap/utils/blob/
|
|
1998
|
+
[isString.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isString.ts#L4)
|
|
1943
1999
|
|
|
1944
2000
|
___
|
|
1945
2001
|
|
|
@@ -1961,7 +2017,7 @@ ___
|
|
|
1961
2017
|
|
|
1962
2018
|
#### Defined in
|
|
1963
2019
|
|
|
1964
|
-
[isURL.ts:4](https://github.com/daysnap/utils/blob/
|
|
2020
|
+
[isURL.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isURL.ts#L4)
|
|
1965
2021
|
|
|
1966
2022
|
___
|
|
1967
2023
|
|
|
@@ -1983,7 +2039,7 @@ val is undefined
|
|
|
1983
2039
|
|
|
1984
2040
|
#### Defined in
|
|
1985
2041
|
|
|
1986
|
-
[isUndefined.ts:4](https://github.com/daysnap/utils/blob/
|
|
2042
|
+
[isUndefined.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isUndefined.ts#L4)
|
|
1987
2043
|
|
|
1988
2044
|
___
|
|
1989
2045
|
|
|
@@ -1999,7 +2055,7 @@ ___
|
|
|
1999
2055
|
|
|
2000
2056
|
#### Defined in
|
|
2001
2057
|
|
|
2002
|
-
[isWeChat.ts:4](https://github.com/daysnap/utils/blob/
|
|
2058
|
+
[isWeChat.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/isWeChat.ts#L4)
|
|
2003
2059
|
|
|
2004
2060
|
___
|
|
2005
2061
|
|
|
@@ -2016,7 +2072,7 @@ https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html
|
|
|
2016
2072
|
|
|
2017
2073
|
#### Defined in
|
|
2018
2074
|
|
|
2019
|
-
[isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/
|
|
2075
|
+
[isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/isWeChatMiniProgram.ts#L5)
|
|
2020
2076
|
|
|
2021
2077
|
___
|
|
2022
2078
|
|
|
@@ -2036,7 +2092,7 @@ ___
|
|
|
2036
2092
|
|
|
2037
2093
|
#### Defined in
|
|
2038
2094
|
|
|
2039
|
-
[isWeChat.ts:12](https://github.com/daysnap/utils/blob/
|
|
2095
|
+
[isWeChat.ts:12](https://github.com/daysnap/utils/blob/867c3c9/src/isWeChat.ts#L12)
|
|
2040
2096
|
|
|
2041
2097
|
___
|
|
2042
2098
|
|
|
@@ -2058,7 +2114,7 @@ val is Window
|
|
|
2058
2114
|
|
|
2059
2115
|
#### Defined in
|
|
2060
2116
|
|
|
2061
|
-
[isWindow.ts:5](https://github.com/daysnap/utils/blob/
|
|
2117
|
+
[isWindow.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/isWindow.ts#L5)
|
|
2062
2118
|
|
|
2063
2119
|
___
|
|
2064
2120
|
|
|
@@ -2081,7 +2137,7 @@ kebabCase('helloWorld') => hello-world
|
|
|
2081
2137
|
|
|
2082
2138
|
#### Defined in
|
|
2083
2139
|
|
|
2084
|
-
[kebabCase.ts:5](https://github.com/daysnap/utils/blob/
|
|
2140
|
+
[kebabCase.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/kebabCase.ts#L5)
|
|
2085
2141
|
|
|
2086
2142
|
___
|
|
2087
2143
|
|
|
@@ -2110,7 +2166,7 @@ list 生成器,快速生成数据
|
|
|
2110
2166
|
|
|
2111
2167
|
#### Defined in
|
|
2112
2168
|
|
|
2113
|
-
[listGenerator.ts:5](https://github.com/daysnap/utils/blob/
|
|
2169
|
+
[listGenerator.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/listGenerator.ts#L5)
|
|
2114
2170
|
|
|
2115
2171
|
___
|
|
2116
2172
|
|
|
@@ -2135,7 +2191,7 @@ ___
|
|
|
2135
2191
|
|
|
2136
2192
|
#### Defined in
|
|
2137
2193
|
|
|
2138
|
-
[mousewheel.ts:22](https://github.com/daysnap/utils/blob/
|
|
2194
|
+
[mousewheel.ts:22](https://github.com/daysnap/utils/blob/867c3c9/src/mousewheel.ts#L22)
|
|
2139
2195
|
|
|
2140
2196
|
___
|
|
2141
2197
|
|
|
@@ -2157,7 +2213,7 @@ ___
|
|
|
2157
2213
|
|
|
2158
2214
|
#### Defined in
|
|
2159
2215
|
|
|
2160
|
-
[normalizePath.ts:4](https://github.com/daysnap/utils/blob/
|
|
2216
|
+
[normalizePath.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/normalizePath.ts#L4)
|
|
2161
2217
|
|
|
2162
2218
|
___
|
|
2163
2219
|
|
|
@@ -2187,7 +2243,7 @@ ___
|
|
|
2187
2243
|
|
|
2188
2244
|
#### Defined in
|
|
2189
2245
|
|
|
2190
|
-
[omit.ts:4](https://github.com/daysnap/utils/blob/
|
|
2246
|
+
[omit.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/omit.ts#L4)
|
|
2191
2247
|
|
|
2192
2248
|
___
|
|
2193
2249
|
|
|
@@ -2211,7 +2267,7 @@ ___
|
|
|
2211
2267
|
|
|
2212
2268
|
#### Defined in
|
|
2213
2269
|
|
|
2214
|
-
[padding.ts:7](https://github.com/daysnap/utils/blob/
|
|
2270
|
+
[padding.ts:7](https://github.com/daysnap/utils/blob/867c3c9/src/padding.ts#L7)
|
|
2215
2271
|
|
|
2216
2272
|
___
|
|
2217
2273
|
|
|
@@ -2233,7 +2289,7 @@ ___
|
|
|
2233
2289
|
|
|
2234
2290
|
#### Defined in
|
|
2235
2291
|
|
|
2236
|
-
[parseDate.ts:4](https://github.com/daysnap/utils/blob/
|
|
2292
|
+
[parseDate.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/parseDate.ts#L4)
|
|
2237
2293
|
|
|
2238
2294
|
___
|
|
2239
2295
|
|
|
@@ -2256,7 +2312,7 @@ ___
|
|
|
2256
2312
|
|
|
2257
2313
|
#### Defined in
|
|
2258
2314
|
|
|
2259
|
-
[parseError.ts:8](https://github.com/daysnap/utils/blob/
|
|
2315
|
+
[parseError.ts:8](https://github.com/daysnap/utils/blob/867c3c9/src/parseError.ts#L8)
|
|
2260
2316
|
|
|
2261
2317
|
___
|
|
2262
2318
|
|
|
@@ -2286,7 +2342,7 @@ parseObject('a.b.c', 1) => { a: { b: { c: 1 } } }
|
|
|
2286
2342
|
|
|
2287
2343
|
#### Defined in
|
|
2288
2344
|
|
|
2289
|
-
[parseObject.ts:5](https://github.com/daysnap/utils/blob/
|
|
2345
|
+
[parseObject.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/parseObject.ts#L5)
|
|
2290
2346
|
|
|
2291
2347
|
___
|
|
2292
2348
|
|
|
@@ -2315,7 +2371,7 @@ ___
|
|
|
2315
2371
|
|
|
2316
2372
|
#### Defined in
|
|
2317
2373
|
|
|
2318
|
-
[parsePath.ts:6](https://github.com/daysnap/utils/blob/
|
|
2374
|
+
[parsePath.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/parsePath.ts#L6)
|
|
2319
2375
|
|
|
2320
2376
|
___
|
|
2321
2377
|
|
|
@@ -2338,7 +2394,7 @@ ___
|
|
|
2338
2394
|
|
|
2339
2395
|
#### Defined in
|
|
2340
2396
|
|
|
2341
|
-
[parseQuery.ts:8](https://github.com/daysnap/utils/blob/
|
|
2397
|
+
[parseQuery.ts:8](https://github.com/daysnap/utils/blob/867c3c9/src/parseQuery.ts#L8)
|
|
2342
2398
|
|
|
2343
2399
|
___
|
|
2344
2400
|
|
|
@@ -2361,7 +2417,7 @@ pascalCase('hello-world') => HelloWorld
|
|
|
2361
2417
|
|
|
2362
2418
|
#### Defined in
|
|
2363
2419
|
|
|
2364
|
-
[pascalCase.ts:8](https://github.com/daysnap/utils/blob/
|
|
2420
|
+
[pascalCase.ts:8](https://github.com/daysnap/utils/blob/867c3c9/src/pascalCase.ts#L8)
|
|
2365
2421
|
|
|
2366
2422
|
___
|
|
2367
2423
|
|
|
@@ -2391,7 +2447,7 @@ ___
|
|
|
2391
2447
|
|
|
2392
2448
|
#### Defined in
|
|
2393
2449
|
|
|
2394
|
-
[pick.ts:4](https://github.com/daysnap/utils/blob/
|
|
2450
|
+
[pick.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/pick.ts#L4)
|
|
2395
2451
|
|
|
2396
2452
|
___
|
|
2397
2453
|
|
|
@@ -2414,7 +2470,7 @@ ___
|
|
|
2414
2470
|
|
|
2415
2471
|
#### Defined in
|
|
2416
2472
|
|
|
2417
|
-
[replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/
|
|
2473
|
+
[replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/replaceCrlf.ts#L4)
|
|
2418
2474
|
|
|
2419
2475
|
___
|
|
2420
2476
|
|
|
@@ -2438,7 +2494,7 @@ ___
|
|
|
2438
2494
|
|
|
2439
2495
|
#### Defined in
|
|
2440
2496
|
|
|
2441
|
-
[requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/
|
|
2497
|
+
[requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/requestFullScreen.ts#L6)
|
|
2442
2498
|
|
|
2443
2499
|
___
|
|
2444
2500
|
|
|
@@ -2464,7 +2520,7 @@ reserve(0, '--') => 0
|
|
|
2464
2520
|
|
|
2465
2521
|
#### Defined in
|
|
2466
2522
|
|
|
2467
|
-
[reserve.ts:8](https://github.com/daysnap/utils/blob/
|
|
2523
|
+
[reserve.ts:8](https://github.com/daysnap/utils/blob/867c3c9/src/reserve.ts#L8)
|
|
2468
2524
|
|
|
2469
2525
|
___
|
|
2470
2526
|
|
|
@@ -2488,7 +2544,7 @@ ___
|
|
|
2488
2544
|
|
|
2489
2545
|
#### Defined in
|
|
2490
2546
|
|
|
2491
|
-
[rgbToHex.ts:4](https://github.com/daysnap/utils/blob/
|
|
2547
|
+
[rgbToHex.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/rgbToHex.ts#L4)
|
|
2492
2548
|
|
|
2493
2549
|
___
|
|
2494
2550
|
|
|
@@ -2511,7 +2567,7 @@ ___
|
|
|
2511
2567
|
|
|
2512
2568
|
#### Defined in
|
|
2513
2569
|
|
|
2514
|
-
[round.ts:6](https://github.com/daysnap/utils/blob/
|
|
2570
|
+
[round.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/round.ts#L6)
|
|
2515
2571
|
|
|
2516
2572
|
___
|
|
2517
2573
|
|
|
@@ -2527,7 +2583,7 @@ ___
|
|
|
2527
2583
|
|
|
2528
2584
|
#### Defined in
|
|
2529
2585
|
|
|
2530
|
-
[scrollToTop.ts:4](https://github.com/daysnap/utils/blob/
|
|
2586
|
+
[scrollToTop.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/scrollToTop.ts#L4)
|
|
2531
2587
|
|
|
2532
2588
|
___
|
|
2533
2589
|
|
|
@@ -2550,7 +2606,7 @@ ___
|
|
|
2550
2606
|
|
|
2551
2607
|
#### Defined in
|
|
2552
2608
|
|
|
2553
|
-
[sleep.ts:6](https://github.com/daysnap/utils/blob/
|
|
2609
|
+
[sleep.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/sleep.ts#L6)
|
|
2554
2610
|
|
|
2555
2611
|
___
|
|
2556
2612
|
|
|
@@ -2579,7 +2635,7 @@ ___
|
|
|
2579
2635
|
|
|
2580
2636
|
#### Defined in
|
|
2581
2637
|
|
|
2582
|
-
[splitArray.ts:4](https://github.com/daysnap/utils/blob/
|
|
2638
|
+
[splitArray.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/splitArray.ts#L4)
|
|
2583
2639
|
|
|
2584
2640
|
___
|
|
2585
2641
|
|
|
@@ -2602,7 +2658,7 @@ ___
|
|
|
2602
2658
|
|
|
2603
2659
|
#### Defined in
|
|
2604
2660
|
|
|
2605
|
-
[stringTrim.ts:6](https://github.com/daysnap/utils/blob/
|
|
2661
|
+
[stringTrim.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/stringTrim.ts#L6)
|
|
2606
2662
|
|
|
2607
2663
|
___
|
|
2608
2664
|
|
|
@@ -2624,13 +2680,13 @@ ___
|
|
|
2624
2680
|
|
|
2625
2681
|
#### Defined in
|
|
2626
2682
|
|
|
2627
|
-
[stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/
|
|
2683
|
+
[stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/867c3c9/src/stringifyQuery.ts#L7)
|
|
2628
2684
|
|
|
2629
2685
|
___
|
|
2630
2686
|
|
|
2631
2687
|
### throttle
|
|
2632
2688
|
|
|
2633
|
-
▸ **throttle**<`T`\>(`fn`, `ms`): (`this`: `unknown`, ...`args`: `Parameters`<`T`\>) => `void`
|
|
2689
|
+
▸ **throttle**<`T`\>(`fn`, `ms`, `mode?`): (`this`: `unknown`, ...`args`: `Parameters`<`T`\>) => `void`
|
|
2634
2690
|
|
|
2635
2691
|
节流函数
|
|
2636
2692
|
减少事件执行次数,有规律的执行
|
|
@@ -2643,6 +2699,93 @@ ___
|
|
|
2643
2699
|
|
|
2644
2700
|
#### Parameters
|
|
2645
2701
|
|
|
2702
|
+
| Name | Type | Default value |
|
|
2703
|
+
| :------ | :------ | :------ |
|
|
2704
|
+
| `fn` | `T` | `undefined` |
|
|
2705
|
+
| `ms` | `number` | `undefined` |
|
|
2706
|
+
| `mode` | ``"leading"`` \| ``"trailing"`` | `'trailing'` |
|
|
2707
|
+
|
|
2708
|
+
#### Returns
|
|
2709
|
+
|
|
2710
|
+
`fn`
|
|
2711
|
+
|
|
2712
|
+
▸ (`this`, `...args`): `void`
|
|
2713
|
+
|
|
2714
|
+
##### Parameters
|
|
2715
|
+
|
|
2716
|
+
| Name | Type |
|
|
2717
|
+
| :------ | :------ |
|
|
2718
|
+
| `this` | `unknown` |
|
|
2719
|
+
| `...args` | `Parameters`<`T`\> |
|
|
2720
|
+
|
|
2721
|
+
##### Returns
|
|
2722
|
+
|
|
2723
|
+
`void`
|
|
2724
|
+
|
|
2725
|
+
#### Defined in
|
|
2726
|
+
|
|
2727
|
+
[throttle.ts:48](https://github.com/daysnap/utils/blob/867c3c9/src/throttle.ts#L48)
|
|
2728
|
+
|
|
2729
|
+
___
|
|
2730
|
+
|
|
2731
|
+
### throttleLeading
|
|
2732
|
+
|
|
2733
|
+
▸ **throttleLeading**<`T`\>(`fn`, `ms`): (`this`: `unknown`, ...`args`: `Parameters`<`T`\>) => `void`
|
|
2734
|
+
|
|
2735
|
+
节流函数,时间戳模式
|
|
2736
|
+
减少事件执行次数,有规律的执行,事件触发后立即执行
|
|
2737
|
+
|
|
2738
|
+
#### Type parameters
|
|
2739
|
+
|
|
2740
|
+
| Name | Type |
|
|
2741
|
+
| :------ | :------ |
|
|
2742
|
+
| `T` | extends (...`args`: `any`[]) => `any` |
|
|
2743
|
+
|
|
2744
|
+
#### Parameters
|
|
2745
|
+
|
|
2746
|
+
| Name | Type |
|
|
2747
|
+
| :------ | :------ |
|
|
2748
|
+
| `fn` | `T` |
|
|
2749
|
+
| `ms` | `number` |
|
|
2750
|
+
|
|
2751
|
+
#### Returns
|
|
2752
|
+
|
|
2753
|
+
`fn`
|
|
2754
|
+
|
|
2755
|
+
▸ (`this`, `...args`): `void`
|
|
2756
|
+
|
|
2757
|
+
##### Parameters
|
|
2758
|
+
|
|
2759
|
+
| Name | Type |
|
|
2760
|
+
| :------ | :------ |
|
|
2761
|
+
| `this` | `unknown` |
|
|
2762
|
+
| `...args` | `Parameters`<`T`\> |
|
|
2763
|
+
|
|
2764
|
+
##### Returns
|
|
2765
|
+
|
|
2766
|
+
`void`
|
|
2767
|
+
|
|
2768
|
+
#### Defined in
|
|
2769
|
+
|
|
2770
|
+
[throttle.ts:5](https://github.com/daysnap/utils/blob/867c3c9/src/throttle.ts#L5)
|
|
2771
|
+
|
|
2772
|
+
___
|
|
2773
|
+
|
|
2774
|
+
### throttleTrailing
|
|
2775
|
+
|
|
2776
|
+
▸ **throttleTrailing**<`T`\>(`fn`, `ms`): (`this`: `unknown`, ...`args`: `Parameters`<`T`\>) => `void`
|
|
2777
|
+
|
|
2778
|
+
节流函数,定时器模式
|
|
2779
|
+
减少事件执行次数,有规律的执行,事件触发后延迟执行
|
|
2780
|
+
|
|
2781
|
+
#### Type parameters
|
|
2782
|
+
|
|
2783
|
+
| Name | Type |
|
|
2784
|
+
| :------ | :------ |
|
|
2785
|
+
| `T` | extends (...`args`: `any`[]) => `any` |
|
|
2786
|
+
|
|
2787
|
+
#### Parameters
|
|
2788
|
+
|
|
2646
2789
|
| Name | Type |
|
|
2647
2790
|
| :------ | :------ |
|
|
2648
2791
|
| `fn` | `T` |
|
|
@@ -2667,7 +2810,7 @@ ___
|
|
|
2667
2810
|
|
|
2668
2811
|
#### Defined in
|
|
2669
2812
|
|
|
2670
|
-
[throttle.ts:
|
|
2813
|
+
[throttle.ts:25](https://github.com/daysnap/utils/blob/867c3c9/src/throttle.ts#L25)
|
|
2671
2814
|
|
|
2672
2815
|
___
|
|
2673
2816
|
|
|
@@ -2689,7 +2832,7 @@ ___
|
|
|
2689
2832
|
|
|
2690
2833
|
#### Defined in
|
|
2691
2834
|
|
|
2692
|
-
[toCDB.ts:4](https://github.com/daysnap/utils/blob/
|
|
2835
|
+
[toCDB.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/toCDB.ts#L4)
|
|
2693
2836
|
|
|
2694
2837
|
___
|
|
2695
2838
|
|
|
@@ -2711,7 +2854,7 @@ ___
|
|
|
2711
2854
|
|
|
2712
2855
|
#### Defined in
|
|
2713
2856
|
|
|
2714
|
-
[toDBC.ts:4](https://github.com/daysnap/utils/blob/
|
|
2857
|
+
[toDBC.ts:4](https://github.com/daysnap/utils/blob/867c3c9/src/toDBC.ts#L4)
|
|
2715
2858
|
|
|
2716
2859
|
___
|
|
2717
2860
|
|
|
@@ -2735,4 +2878,4 @@ ___
|
|
|
2735
2878
|
|
|
2736
2879
|
#### Defined in
|
|
2737
2880
|
|
|
2738
|
-
[typeOf.ts:6](https://github.com/daysnap/utils/blob/
|
|
2881
|
+
[typeOf.ts:6](https://github.com/daysnap/utils/blob/867c3c9/src/typeOf.ts#L6)
|