@daysnap/utils 0.0.73 → 0.0.74
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 +111 -112
- package/es/formatAmount.d.ts +1 -1
- package/es/formatAmount.js +2 -2
- package/es/formatMessage.js +1 -1
- package/lib/formatAmount.d.ts +1 -1
- package/lib/formatAmount.js +2 -2
- package/lib/formatMessage.js +1 -1
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
#### Defined in
|
|
37
37
|
|
|
38
|
-
[storage/factory.ts:3](https://github.com/daysnap/utils/blob/
|
|
38
|
+
[storage/factory.ts:3](https://github.com/daysnap/utils/blob/f85d32c/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/
|
|
52
|
+
[storage/factory.ts:4](https://github.com/daysnap/utils/blob/f85d32c/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/
|
|
72
|
+
[storage/factory.ts:2](https://github.com/daysnap/utils/blob/f85d32c/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/
|
|
92
|
+
[storage/factory.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/storage/factory.ts#L5)
|
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/f85d32c/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/f85d32c/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/f85d32c/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/f85d32c/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/f85d32c/src/trap.ts#L9)
|
package/docs/modules.md
CHANGED
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
|
|
130
130
|
#### Defined in
|
|
131
131
|
|
|
132
|
-
[trap.ts:15](https://github.com/daysnap/utils/blob/
|
|
132
|
+
[trap.ts:15](https://github.com/daysnap/utils/blob/f85d32c/src/trap.ts#L15)
|
|
133
133
|
|
|
134
134
|
## Functions
|
|
135
135
|
|
|
@@ -167,7 +167,7 @@ res = { '1': '男', '2': '女' }
|
|
|
167
167
|
|
|
168
168
|
#### Defined in
|
|
169
169
|
|
|
170
|
-
[ato.ts:12](https://github.com/daysnap/utils/blob/
|
|
170
|
+
[ato.ts:12](https://github.com/daysnap/utils/blob/f85d32c/src/ato.ts#L12)
|
|
171
171
|
|
|
172
172
|
▸ **ato**<`T`, `K`\>(`options`, `labelKey`, `valueKey`): `Record`<`T`[`K`], `any`\>
|
|
173
173
|
|
|
@@ -192,7 +192,7 @@ res = { '1': '男', '2': '女' }
|
|
|
192
192
|
|
|
193
193
|
#### Defined in
|
|
194
194
|
|
|
195
|
-
[ato.ts:16](https://github.com/daysnap/utils/blob/
|
|
195
|
+
[ato.ts:16](https://github.com/daysnap/utils/blob/f85d32c/src/ato.ts#L16)
|
|
196
196
|
|
|
197
197
|
___
|
|
198
198
|
|
|
@@ -215,7 +215,7 @@ base64 转 blob
|
|
|
215
215
|
|
|
216
216
|
#### Defined in
|
|
217
217
|
|
|
218
|
-
[base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/
|
|
218
|
+
[base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/base64ToBlob.ts#L6)
|
|
219
219
|
|
|
220
220
|
___
|
|
221
221
|
|
|
@@ -237,7 +237,7 @@ blob 转 base64
|
|
|
237
237
|
|
|
238
238
|
#### Defined in
|
|
239
239
|
|
|
240
|
-
[blobToBase64.ts:4](https://github.com/daysnap/utils/blob/
|
|
240
|
+
[blobToBase64.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/blobToBase64.ts#L4)
|
|
241
241
|
|
|
242
242
|
___
|
|
243
243
|
|
|
@@ -278,7 +278,7 @@ ___
|
|
|
278
278
|
|
|
279
279
|
#### Defined in
|
|
280
280
|
|
|
281
|
-
[cached.ts:5](https://github.com/daysnap/utils/blob/
|
|
281
|
+
[cached.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/cached.ts#L5)
|
|
282
282
|
|
|
283
283
|
___
|
|
284
284
|
|
|
@@ -301,7 +301,7 @@ camelCase('hello-world') => helloWorld
|
|
|
301
301
|
|
|
302
302
|
#### Defined in
|
|
303
303
|
|
|
304
|
-
[camelCase.ts:5](https://github.com/daysnap/utils/blob/
|
|
304
|
+
[camelCase.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/camelCase.ts#L5)
|
|
305
305
|
|
|
306
306
|
___
|
|
307
307
|
|
|
@@ -325,7 +325,7 @@ canvas 转 blob 文件
|
|
|
325
325
|
|
|
326
326
|
#### Defined in
|
|
327
327
|
|
|
328
|
-
[canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/
|
|
328
|
+
[canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/canvasToBlob.ts#L4)
|
|
329
329
|
|
|
330
330
|
___
|
|
331
331
|
|
|
@@ -348,7 +348,7 @@ capitalize('hello world') => Hello world
|
|
|
348
348
|
|
|
349
349
|
#### Defined in
|
|
350
350
|
|
|
351
|
-
[capitalize.ts:5](https://github.com/daysnap/utils/blob/
|
|
351
|
+
[capitalize.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/capitalize.ts#L5)
|
|
352
352
|
|
|
353
353
|
___
|
|
354
354
|
|
|
@@ -372,7 +372,7 @@ ___
|
|
|
372
372
|
|
|
373
373
|
#### Defined in
|
|
374
374
|
|
|
375
|
-
[clamp.ts:7](https://github.com/daysnap/utils/blob/
|
|
375
|
+
[clamp.ts:7](https://github.com/daysnap/utils/blob/f85d32c/src/clamp.ts#L7)
|
|
376
376
|
|
|
377
377
|
___
|
|
378
378
|
|
|
@@ -400,7 +400,7 @@ ___
|
|
|
400
400
|
|
|
401
401
|
#### Defined in
|
|
402
402
|
|
|
403
|
-
[clone.ts:8](https://github.com/daysnap/utils/blob/
|
|
403
|
+
[clone.ts:8](https://github.com/daysnap/utils/blob/f85d32c/src/clone.ts#L8)
|
|
404
404
|
|
|
405
405
|
___
|
|
406
406
|
|
|
@@ -428,7 +428,7 @@ ___
|
|
|
428
428
|
|
|
429
429
|
#### Defined in
|
|
430
430
|
|
|
431
|
-
[cloneSimple.ts:7](https://github.com/daysnap/utils/blob/
|
|
431
|
+
[cloneSimple.ts:7](https://github.com/daysnap/utils/blob/f85d32c/src/cloneSimple.ts#L7)
|
|
432
432
|
|
|
433
433
|
___
|
|
434
434
|
|
|
@@ -450,7 +450,7 @@ ___
|
|
|
450
450
|
|
|
451
451
|
#### Defined in
|
|
452
452
|
|
|
453
|
-
[createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/
|
|
453
|
+
[createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/createHexColorByHash.ts#L4)
|
|
454
454
|
|
|
455
455
|
___
|
|
456
456
|
|
|
@@ -476,7 +476,7 @@ ___
|
|
|
476
476
|
|
|
477
477
|
#### Defined in
|
|
478
478
|
|
|
479
|
-
[compareVersion.ts:9](https://github.com/daysnap/utils/blob/
|
|
479
|
+
[compareVersion.ts:9](https://github.com/daysnap/utils/blob/f85d32c/src/compareVersion.ts#L9)
|
|
480
480
|
|
|
481
481
|
___
|
|
482
482
|
|
|
@@ -498,7 +498,7 @@ ___
|
|
|
498
498
|
|
|
499
499
|
#### Defined in
|
|
500
500
|
|
|
501
|
-
[compressImage.ts:6](https://github.com/daysnap/utils/blob/
|
|
501
|
+
[compressImage.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/compressImage.ts#L6)
|
|
502
502
|
|
|
503
503
|
___
|
|
504
504
|
|
|
@@ -561,7 +561,7 @@ fn() 执行的时候就会执行showLoading
|
|
|
561
561
|
|
|
562
562
|
#### Defined in
|
|
563
563
|
|
|
564
|
-
[createWithLoading.ts:9](https://github.com/daysnap/utils/blob/
|
|
564
|
+
[createWithLoading.ts:9](https://github.com/daysnap/utils/blob/f85d32c/src/createWithLoading.ts#L9)
|
|
565
565
|
|
|
566
566
|
___
|
|
567
567
|
|
|
@@ -604,7 +604,7 @@ ___
|
|
|
604
604
|
|
|
605
605
|
#### Defined in
|
|
606
606
|
|
|
607
|
-
[debounce.ts:5](https://github.com/daysnap/utils/blob/
|
|
607
|
+
[debounce.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/debounce.ts#L5)
|
|
608
608
|
|
|
609
609
|
___
|
|
610
610
|
|
|
@@ -628,7 +628,7 @@ ___
|
|
|
628
628
|
|
|
629
629
|
#### Defined in
|
|
630
630
|
|
|
631
|
-
[downloadFile.ts:4](https://github.com/daysnap/utils/blob/
|
|
631
|
+
[downloadFile.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/downloadFile.ts#L4)
|
|
632
632
|
|
|
633
633
|
___
|
|
634
634
|
|
|
@@ -657,7 +657,7 @@ ___
|
|
|
657
657
|
|
|
658
658
|
#### Defined in
|
|
659
659
|
|
|
660
|
-
[each.ts:4](https://github.com/daysnap/utils/blob/
|
|
660
|
+
[each.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/each.ts#L4)
|
|
661
661
|
|
|
662
662
|
▸ **each**<`T`\>(`data`, `callback`): `void`
|
|
663
663
|
|
|
@@ -680,7 +680,7 @@ ___
|
|
|
680
680
|
|
|
681
681
|
#### Defined in
|
|
682
682
|
|
|
683
|
-
[each.ts:8](https://github.com/daysnap/utils/blob/
|
|
683
|
+
[each.ts:8](https://github.com/daysnap/utils/blob/f85d32c/src/each.ts#L8)
|
|
684
684
|
|
|
685
685
|
___
|
|
686
686
|
|
|
@@ -698,7 +698,7 @@ ___
|
|
|
698
698
|
|
|
699
699
|
#### Defined in
|
|
700
700
|
|
|
701
|
-
[exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/
|
|
701
|
+
[exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/exitFullscreen.ts#L6)
|
|
702
702
|
|
|
703
703
|
___
|
|
704
704
|
|
|
@@ -727,7 +727,7 @@ ___
|
|
|
727
727
|
|
|
728
728
|
#### Defined in
|
|
729
729
|
|
|
730
|
-
[storage/factory.ts:8](https://github.com/daysnap/utils/blob/
|
|
730
|
+
[storage/factory.ts:8](https://github.com/daysnap/utils/blob/f85d32c/src/storage/factory.ts#L8)
|
|
731
731
|
|
|
732
732
|
___
|
|
733
733
|
|
|
@@ -749,7 +749,7 @@ ___
|
|
|
749
749
|
|
|
750
750
|
#### Defined in
|
|
751
751
|
|
|
752
|
-
[filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/
|
|
752
|
+
[filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/filterBankCardNo.ts#L4)
|
|
753
753
|
|
|
754
754
|
___
|
|
755
755
|
|
|
@@ -771,7 +771,7 @@ ___
|
|
|
771
771
|
|
|
772
772
|
#### Defined in
|
|
773
773
|
|
|
774
|
-
[filterCRLF.ts:4](https://github.com/daysnap/utils/blob/
|
|
774
|
+
[filterCRLF.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/filterCRLF.ts#L4)
|
|
775
775
|
|
|
776
776
|
___
|
|
777
777
|
|
|
@@ -793,7 +793,7 @@ ___
|
|
|
793
793
|
|
|
794
794
|
#### Defined in
|
|
795
795
|
|
|
796
|
-
[filterEmoji.ts:4](https://github.com/daysnap/utils/blob/
|
|
796
|
+
[filterEmoji.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/filterEmoji.ts#L4)
|
|
797
797
|
|
|
798
798
|
___
|
|
799
799
|
|
|
@@ -816,7 +816,7 @@ ___
|
|
|
816
816
|
|
|
817
817
|
#### Defined in
|
|
818
818
|
|
|
819
|
-
[filterEmptyValue.ts:12](https://github.com/daysnap/utils/blob/
|
|
819
|
+
[filterEmptyValue.ts:12](https://github.com/daysnap/utils/blob/f85d32c/src/filterEmptyValue.ts#L12)
|
|
820
820
|
|
|
821
821
|
___
|
|
822
822
|
|
|
@@ -839,7 +839,7 @@ ___
|
|
|
839
839
|
|
|
840
840
|
#### Defined in
|
|
841
841
|
|
|
842
|
-
[filterIdCard.ts:5](https://github.com/daysnap/utils/blob/
|
|
842
|
+
[filterIdCard.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/filterIdCard.ts#L5)
|
|
843
843
|
|
|
844
844
|
___
|
|
845
845
|
|
|
@@ -861,7 +861,7 @@ ___
|
|
|
861
861
|
|
|
862
862
|
#### Defined in
|
|
863
863
|
|
|
864
|
-
[filterName.ts:4](https://github.com/daysnap/utils/blob/
|
|
864
|
+
[filterName.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/filterName.ts#L4)
|
|
865
865
|
|
|
866
866
|
___
|
|
867
867
|
|
|
@@ -886,7 +886,7 @@ filterPhone('13177778888', ' ') => 131 **** 8888
|
|
|
886
886
|
|
|
887
887
|
#### Defined in
|
|
888
888
|
|
|
889
|
-
[filterPhone.ts:6](https://github.com/daysnap/utils/blob/
|
|
889
|
+
[filterPhone.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/filterPhone.ts#L6)
|
|
890
890
|
|
|
891
891
|
___
|
|
892
892
|
|
|
@@ -913,13 +913,13 @@ str = '131****8888'
|
|
|
913
913
|
|
|
914
914
|
#### Defined in
|
|
915
915
|
|
|
916
|
-
[filterString.ts:6](https://github.com/daysnap/utils/blob/
|
|
916
|
+
[filterString.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/filterString.ts#L6)
|
|
917
917
|
|
|
918
918
|
___
|
|
919
919
|
|
|
920
920
|
### formatAmount
|
|
921
921
|
|
|
922
|
-
▸ **formatAmount**(`s`, `radix
|
|
922
|
+
▸ **formatAmount**(`s`, `radix?`): `string`
|
|
923
923
|
|
|
924
924
|
格式化金额,默认元
|
|
925
925
|
|
|
@@ -929,7 +929,6 @@ ___
|
|
|
929
929
|
| :------ | :------ | :------ |
|
|
930
930
|
| `s` | `string` \| `number` | `undefined` |
|
|
931
931
|
| `radix` | `number` | `1` |
|
|
932
|
-
| `digits` | `number` | `2` |
|
|
933
932
|
|
|
934
933
|
#### Returns
|
|
935
934
|
|
|
@@ -937,7 +936,7 @@ ___
|
|
|
937
936
|
|
|
938
937
|
#### Defined in
|
|
939
938
|
|
|
940
|
-
[formatAmount.ts:4](https://github.com/daysnap/utils/blob/
|
|
939
|
+
[formatAmount.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/formatAmount.ts#L4)
|
|
941
940
|
|
|
942
941
|
___
|
|
943
942
|
|
|
@@ -961,7 +960,7 @@ ___
|
|
|
961
960
|
|
|
962
961
|
#### Defined in
|
|
963
962
|
|
|
964
|
-
[formatDate.ts:8](https://github.com/daysnap/utils/blob/
|
|
963
|
+
[formatDate.ts:8](https://github.com/daysnap/utils/blob/f85d32c/src/formatDate.ts#L8)
|
|
965
964
|
|
|
966
965
|
___
|
|
967
966
|
|
|
@@ -984,7 +983,7 @@ fix iOS 日期时间格式如果是 - 就会报错的问题
|
|
|
984
983
|
|
|
985
984
|
#### Defined in
|
|
986
985
|
|
|
987
|
-
[formatDateStr.ts:5](https://github.com/daysnap/utils/blob/
|
|
986
|
+
[formatDateStr.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/formatDateStr.ts#L5)
|
|
988
987
|
|
|
989
988
|
___
|
|
990
989
|
|
|
@@ -1009,7 +1008,7 @@ formatMessage({ a: '123', b: { ba: '456' } }, ['b.ba']) => '456'
|
|
|
1009
1008
|
|
|
1010
1009
|
#### Defined in
|
|
1011
1010
|
|
|
1012
|
-
[formatMessage.ts:11](https://github.com/daysnap/utils/blob/
|
|
1011
|
+
[formatMessage.ts:11](https://github.com/daysnap/utils/blob/f85d32c/src/formatMessage.ts#L11)
|
|
1013
1012
|
|
|
1014
1013
|
___
|
|
1015
1014
|
|
|
@@ -1041,7 +1040,7 @@ rest = { xxx: 1 }
|
|
|
1041
1040
|
|
|
1042
1041
|
#### Defined in
|
|
1043
1042
|
|
|
1044
|
-
[formatPathParams.ts:8](https://github.com/daysnap/utils/blob/
|
|
1043
|
+
[formatPathParams.ts:8](https://github.com/daysnap/utils/blob/f85d32c/src/formatPathParams.ts#L8)
|
|
1045
1044
|
|
|
1046
1045
|
___
|
|
1047
1046
|
|
|
@@ -1063,7 +1062,7 @@ ___
|
|
|
1063
1062
|
|
|
1064
1063
|
#### Defined in
|
|
1065
1064
|
|
|
1066
|
-
[getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/
|
|
1065
|
+
[getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/getBlobByUrl.ts#L4)
|
|
1067
1066
|
|
|
1068
1067
|
___
|
|
1069
1068
|
|
|
@@ -1086,7 +1085,7 @@ ___
|
|
|
1086
1085
|
|
|
1087
1086
|
#### Defined in
|
|
1088
1087
|
|
|
1089
|
-
[storage/index.ts:9](https://github.com/daysnap/utils/blob/
|
|
1088
|
+
[storage/index.ts:9](https://github.com/daysnap/utils/blob/f85d32c/src/storage/index.ts#L9)
|
|
1090
1089
|
|
|
1091
1090
|
___
|
|
1092
1091
|
|
|
@@ -1108,7 +1107,7 @@ ___
|
|
|
1108
1107
|
|
|
1109
1108
|
#### Defined in
|
|
1110
1109
|
|
|
1111
|
-
[getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/
|
|
1110
|
+
[getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/getDayMillisecond.ts#L4)
|
|
1112
1111
|
|
|
1113
1112
|
___
|
|
1114
1113
|
|
|
@@ -1130,7 +1129,7 @@ ___
|
|
|
1130
1129
|
|
|
1131
1130
|
#### Defined in
|
|
1132
1131
|
|
|
1133
|
-
[getImageInfo.ts:4](https://github.com/daysnap/utils/blob/
|
|
1132
|
+
[getImageInfo.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/getImageInfo.ts#L4)
|
|
1134
1133
|
|
|
1135
1134
|
___
|
|
1136
1135
|
|
|
@@ -1153,7 +1152,7 @@ ___
|
|
|
1153
1152
|
|
|
1154
1153
|
#### Defined in
|
|
1155
1154
|
|
|
1156
|
-
[storage/index.ts:9](https://github.com/daysnap/utils/blob/
|
|
1155
|
+
[storage/index.ts:9](https://github.com/daysnap/utils/blob/f85d32c/src/storage/index.ts#L9)
|
|
1157
1156
|
|
|
1158
1157
|
___
|
|
1159
1158
|
|
|
@@ -1176,7 +1175,7 @@ ___
|
|
|
1176
1175
|
|
|
1177
1176
|
#### Defined in
|
|
1178
1177
|
|
|
1179
|
-
[getRandom.ts:7](https://github.com/daysnap/utils/blob/
|
|
1178
|
+
[getRandom.ts:7](https://github.com/daysnap/utils/blob/f85d32c/src/getRandom.ts#L7)
|
|
1180
1179
|
|
|
1181
1180
|
___
|
|
1182
1181
|
|
|
@@ -1192,7 +1191,7 @@ ___
|
|
|
1192
1191
|
|
|
1193
1192
|
#### Defined in
|
|
1194
1193
|
|
|
1195
|
-
[getRandomColor.ts:4](https://github.com/daysnap/utils/blob/
|
|
1194
|
+
[getRandomColor.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/getRandomColor.ts#L4)
|
|
1196
1195
|
|
|
1197
1196
|
___
|
|
1198
1197
|
|
|
@@ -1214,7 +1213,7 @@ ___
|
|
|
1214
1213
|
|
|
1215
1214
|
#### Defined in
|
|
1216
1215
|
|
|
1217
|
-
[getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/
|
|
1216
|
+
[getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/f85d32c/src/getRandomNumber.ts#L7)
|
|
1218
1217
|
|
|
1219
1218
|
___
|
|
1220
1219
|
|
|
@@ -1236,7 +1235,7 @@ ___
|
|
|
1236
1235
|
|
|
1237
1236
|
#### Defined in
|
|
1238
1237
|
|
|
1239
|
-
[getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/
|
|
1238
|
+
[getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/getVideoInfo.ts#L4)
|
|
1240
1239
|
|
|
1241
1240
|
___
|
|
1242
1241
|
|
|
@@ -1252,7 +1251,7 @@ ___
|
|
|
1252
1251
|
|
|
1253
1252
|
#### Defined in
|
|
1254
1253
|
|
|
1255
|
-
[inBrowser.ts:4](https://github.com/daysnap/utils/blob/
|
|
1254
|
+
[inBrowser.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/inBrowser.ts#L4)
|
|
1256
1255
|
|
|
1257
1256
|
___
|
|
1258
1257
|
|
|
@@ -1274,7 +1273,7 @@ ___
|
|
|
1274
1273
|
|
|
1275
1274
|
#### Defined in
|
|
1276
1275
|
|
|
1277
|
-
[insertLink.ts:4](https://github.com/daysnap/utils/blob/
|
|
1276
|
+
[insertLink.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/insertLink.ts#L4)
|
|
1278
1277
|
|
|
1279
1278
|
▸ **insertLink**(`href`, `callback`): `void`
|
|
1280
1279
|
|
|
@@ -1291,7 +1290,7 @@ ___
|
|
|
1291
1290
|
|
|
1292
1291
|
#### Defined in
|
|
1293
1292
|
|
|
1294
|
-
[insertLink.ts:5](https://github.com/daysnap/utils/blob/
|
|
1293
|
+
[insertLink.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/insertLink.ts#L5)
|
|
1295
1294
|
|
|
1296
1295
|
___
|
|
1297
1296
|
|
|
@@ -1313,7 +1312,7 @@ ___
|
|
|
1313
1312
|
|
|
1314
1313
|
#### Defined in
|
|
1315
1314
|
|
|
1316
|
-
[insertScript.ts:4](https://github.com/daysnap/utils/blob/
|
|
1315
|
+
[insertScript.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/insertScript.ts#L4)
|
|
1317
1316
|
|
|
1318
1317
|
▸ **insertScript**(`src`, `callback`): `void`
|
|
1319
1318
|
|
|
@@ -1330,7 +1329,7 @@ ___
|
|
|
1330
1329
|
|
|
1331
1330
|
#### Defined in
|
|
1332
1331
|
|
|
1333
|
-
[insertScript.ts:5](https://github.com/daysnap/utils/blob/
|
|
1332
|
+
[insertScript.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/insertScript.ts#L5)
|
|
1334
1333
|
|
|
1335
1334
|
___
|
|
1336
1335
|
|
|
@@ -1352,7 +1351,7 @@ ___
|
|
|
1352
1351
|
|
|
1353
1352
|
#### Defined in
|
|
1354
1353
|
|
|
1355
|
-
[insertStyle.ts:4](https://github.com/daysnap/utils/blob/
|
|
1354
|
+
[insertStyle.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/insertStyle.ts#L4)
|
|
1356
1355
|
|
|
1357
1356
|
___
|
|
1358
1357
|
|
|
@@ -1381,7 +1380,7 @@ isAmount('1.123') => false
|
|
|
1381
1380
|
|
|
1382
1381
|
#### Defined in
|
|
1383
1382
|
|
|
1384
|
-
[isAmount.ts:11](https://github.com/daysnap/utils/blob/
|
|
1383
|
+
[isAmount.ts:11](https://github.com/daysnap/utils/blob/f85d32c/src/isAmount.ts#L11)
|
|
1385
1384
|
|
|
1386
1385
|
___
|
|
1387
1386
|
|
|
@@ -1397,7 +1396,7 @@ ___
|
|
|
1397
1396
|
|
|
1398
1397
|
#### Defined in
|
|
1399
1398
|
|
|
1400
|
-
[isAndroid.ts:4](https://github.com/daysnap/utils/blob/
|
|
1399
|
+
[isAndroid.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isAndroid.ts#L4)
|
|
1401
1400
|
|
|
1402
1401
|
___
|
|
1403
1402
|
|
|
@@ -1421,7 +1420,7 @@ val is any[]
|
|
|
1421
1420
|
|
|
1422
1421
|
#### Defined in
|
|
1423
1422
|
|
|
1424
|
-
[isArray.ts:6](https://github.com/daysnap/utils/blob/
|
|
1423
|
+
[isArray.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/isArray.ts#L6)
|
|
1425
1424
|
|
|
1426
1425
|
___
|
|
1427
1426
|
|
|
@@ -1443,7 +1442,7 @@ val is boolean
|
|
|
1443
1442
|
|
|
1444
1443
|
#### Defined in
|
|
1445
1444
|
|
|
1446
|
-
[isBoolean.ts:5](https://github.com/daysnap/utils/blob/
|
|
1445
|
+
[isBoolean.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/isBoolean.ts#L5)
|
|
1447
1446
|
|
|
1448
1447
|
___
|
|
1449
1448
|
|
|
@@ -1465,7 +1464,7 @@ ___
|
|
|
1465
1464
|
|
|
1466
1465
|
#### Defined in
|
|
1467
1466
|
|
|
1468
|
-
[isChinese.ts:4](https://github.com/daysnap/utils/blob/
|
|
1467
|
+
[isChinese.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isChinese.ts#L4)
|
|
1469
1468
|
|
|
1470
1469
|
___
|
|
1471
1470
|
|
|
@@ -1487,7 +1486,7 @@ val is Date
|
|
|
1487
1486
|
|
|
1488
1487
|
#### Defined in
|
|
1489
1488
|
|
|
1490
|
-
[isDate.ts:4](https://github.com/daysnap/utils/blob/
|
|
1489
|
+
[isDate.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isDate.ts#L4)
|
|
1491
1490
|
|
|
1492
1491
|
___
|
|
1493
1492
|
|
|
@@ -1509,7 +1508,7 @@ ___
|
|
|
1509
1508
|
|
|
1510
1509
|
#### Defined in
|
|
1511
1510
|
|
|
1512
|
-
[isEmail.ts:4](https://github.com/daysnap/utils/blob/
|
|
1511
|
+
[isEmail.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isEmail.ts#L4)
|
|
1513
1512
|
|
|
1514
1513
|
___
|
|
1515
1514
|
|
|
@@ -1531,7 +1530,7 @@ ___
|
|
|
1531
1530
|
|
|
1532
1531
|
#### Defined in
|
|
1533
1532
|
|
|
1534
|
-
[isEmpty.ts:6](https://github.com/daysnap/utils/blob/
|
|
1533
|
+
[isEmpty.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/isEmpty.ts#L6)
|
|
1535
1534
|
|
|
1536
1535
|
___
|
|
1537
1536
|
|
|
@@ -1553,7 +1552,7 @@ ___
|
|
|
1553
1552
|
|
|
1554
1553
|
#### Defined in
|
|
1555
1554
|
|
|
1556
|
-
[isEmptyArray.ts:6](https://github.com/daysnap/utils/blob/
|
|
1555
|
+
[isEmptyArray.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/isEmptyArray.ts#L6)
|
|
1557
1556
|
|
|
1558
1557
|
___
|
|
1559
1558
|
|
|
@@ -1575,7 +1574,7 @@ ___
|
|
|
1575
1574
|
|
|
1576
1575
|
#### Defined in
|
|
1577
1576
|
|
|
1578
|
-
[isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/
|
|
1577
|
+
[isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/isEmptyObject.ts#L5)
|
|
1579
1578
|
|
|
1580
1579
|
___
|
|
1581
1580
|
|
|
@@ -1597,7 +1596,7 @@ val is Error
|
|
|
1597
1596
|
|
|
1598
1597
|
#### Defined in
|
|
1599
1598
|
|
|
1600
|
-
[isError.ts:4](https://github.com/daysnap/utils/blob/
|
|
1599
|
+
[isError.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isError.ts#L4)
|
|
1601
1600
|
|
|
1602
1601
|
___
|
|
1603
1602
|
|
|
@@ -1619,7 +1618,7 @@ val is Function
|
|
|
1619
1618
|
|
|
1620
1619
|
#### Defined in
|
|
1621
1620
|
|
|
1622
|
-
[isFunction.ts:4](https://github.com/daysnap/utils/blob/
|
|
1621
|
+
[isFunction.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isFunction.ts#L4)
|
|
1623
1622
|
|
|
1624
1623
|
___
|
|
1625
1624
|
|
|
@@ -1637,7 +1636,7 @@ ___
|
|
|
1637
1636
|
|
|
1638
1637
|
#### Defined in
|
|
1639
1638
|
|
|
1640
|
-
[isIE.ts:6](https://github.com/daysnap/utils/blob/
|
|
1639
|
+
[isIE.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/isIE.ts#L6)
|
|
1641
1640
|
|
|
1642
1641
|
___
|
|
1643
1642
|
|
|
@@ -1653,7 +1652,7 @@ ___
|
|
|
1653
1652
|
|
|
1654
1653
|
#### Defined in
|
|
1655
1654
|
|
|
1656
|
-
[isIOS.ts:4](https://github.com/daysnap/utils/blob/
|
|
1655
|
+
[isIOS.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isIOS.ts#L4)
|
|
1657
1656
|
|
|
1658
1657
|
___
|
|
1659
1658
|
|
|
@@ -1675,7 +1674,7 @@ ___
|
|
|
1675
1674
|
|
|
1676
1675
|
#### Defined in
|
|
1677
1676
|
|
|
1678
|
-
[isIdCard.ts:4](https://github.com/daysnap/utils/blob/
|
|
1677
|
+
[isIdCard.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isIdCard.ts#L4)
|
|
1679
1678
|
|
|
1680
1679
|
___
|
|
1681
1680
|
|
|
@@ -1697,7 +1696,7 @@ ___
|
|
|
1697
1696
|
|
|
1698
1697
|
#### Defined in
|
|
1699
1698
|
|
|
1700
|
-
[isJSONString.ts:7](https://github.com/daysnap/utils/blob/
|
|
1699
|
+
[isJSONString.ts:7](https://github.com/daysnap/utils/blob/f85d32c/src/isJSONString.ts#L7)
|
|
1701
1700
|
|
|
1702
1701
|
___
|
|
1703
1702
|
|
|
@@ -1719,7 +1718,7 @@ ___
|
|
|
1719
1718
|
|
|
1720
1719
|
#### Defined in
|
|
1721
1720
|
|
|
1722
|
-
[isLan.ts:5](https://github.com/daysnap/utils/blob/
|
|
1721
|
+
[isLan.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/isLan.ts#L5)
|
|
1723
1722
|
|
|
1724
1723
|
___
|
|
1725
1724
|
|
|
@@ -1741,7 +1740,7 @@ ___
|
|
|
1741
1740
|
|
|
1742
1741
|
#### Defined in
|
|
1743
1742
|
|
|
1744
|
-
[isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/
|
|
1743
|
+
[isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/isLicenseCode.ts#L5)
|
|
1745
1744
|
|
|
1746
1745
|
___
|
|
1747
1746
|
|
|
@@ -1757,7 +1756,7 @@ ___
|
|
|
1757
1756
|
|
|
1758
1757
|
#### Defined in
|
|
1759
1758
|
|
|
1760
|
-
[isMobile.ts:4](https://github.com/daysnap/utils/blob/
|
|
1759
|
+
[isMobile.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isMobile.ts#L4)
|
|
1761
1760
|
|
|
1762
1761
|
___
|
|
1763
1762
|
|
|
@@ -1780,7 +1779,7 @@ ___
|
|
|
1780
1779
|
|
|
1781
1780
|
#### Defined in
|
|
1782
1781
|
|
|
1783
|
-
[isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/
|
|
1782
|
+
[isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/f85d32c/src/isNativeFunction.ts#L7)
|
|
1784
1783
|
|
|
1785
1784
|
___
|
|
1786
1785
|
|
|
@@ -1802,7 +1801,7 @@ val is null
|
|
|
1802
1801
|
|
|
1803
1802
|
#### Defined in
|
|
1804
1803
|
|
|
1805
|
-
[isNull.ts:4](https://github.com/daysnap/utils/blob/
|
|
1804
|
+
[isNull.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isNull.ts#L4)
|
|
1806
1805
|
|
|
1807
1806
|
___
|
|
1808
1807
|
|
|
@@ -1824,7 +1823,7 @@ val is number
|
|
|
1824
1823
|
|
|
1825
1824
|
#### Defined in
|
|
1826
1825
|
|
|
1827
|
-
[isNumber.ts:5](https://github.com/daysnap/utils/blob/
|
|
1826
|
+
[isNumber.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/isNumber.ts#L5)
|
|
1828
1827
|
|
|
1829
1828
|
___
|
|
1830
1829
|
|
|
@@ -1846,7 +1845,7 @@ val is Record<string, any\>
|
|
|
1846
1845
|
|
|
1847
1846
|
#### Defined in
|
|
1848
1847
|
|
|
1849
|
-
[isObject.ts:4](https://github.com/daysnap/utils/blob/
|
|
1848
|
+
[isObject.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isObject.ts#L4)
|
|
1850
1849
|
|
|
1851
1850
|
___
|
|
1852
1851
|
|
|
@@ -1868,7 +1867,7 @@ ___
|
|
|
1868
1867
|
|
|
1869
1868
|
#### Defined in
|
|
1870
1869
|
|
|
1871
|
-
[isPhone.ts:4](https://github.com/daysnap/utils/blob/
|
|
1870
|
+
[isPhone.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isPhone.ts#L4)
|
|
1872
1871
|
|
|
1873
1872
|
___
|
|
1874
1873
|
|
|
@@ -1896,7 +1895,7 @@ val is Promise<T\>
|
|
|
1896
1895
|
|
|
1897
1896
|
#### Defined in
|
|
1898
1897
|
|
|
1899
|
-
[isPromise.ts:4](https://github.com/daysnap/utils/blob/
|
|
1898
|
+
[isPromise.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isPromise.ts#L4)
|
|
1900
1899
|
|
|
1901
1900
|
___
|
|
1902
1901
|
|
|
@@ -1918,7 +1917,7 @@ val is RegExp
|
|
|
1918
1917
|
|
|
1919
1918
|
#### Defined in
|
|
1920
1919
|
|
|
1921
|
-
[isRegExp.ts:4](https://github.com/daysnap/utils/blob/
|
|
1920
|
+
[isRegExp.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isRegExp.ts#L4)
|
|
1922
1921
|
|
|
1923
1922
|
___
|
|
1924
1923
|
|
|
@@ -1940,7 +1939,7 @@ val is string
|
|
|
1940
1939
|
|
|
1941
1940
|
#### Defined in
|
|
1942
1941
|
|
|
1943
|
-
[isString.ts:4](https://github.com/daysnap/utils/blob/
|
|
1942
|
+
[isString.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isString.ts#L4)
|
|
1944
1943
|
|
|
1945
1944
|
___
|
|
1946
1945
|
|
|
@@ -1962,7 +1961,7 @@ ___
|
|
|
1962
1961
|
|
|
1963
1962
|
#### Defined in
|
|
1964
1963
|
|
|
1965
|
-
[isURL.ts:4](https://github.com/daysnap/utils/blob/
|
|
1964
|
+
[isURL.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isURL.ts#L4)
|
|
1966
1965
|
|
|
1967
1966
|
___
|
|
1968
1967
|
|
|
@@ -1984,7 +1983,7 @@ val is undefined
|
|
|
1984
1983
|
|
|
1985
1984
|
#### Defined in
|
|
1986
1985
|
|
|
1987
|
-
[isUndefined.ts:4](https://github.com/daysnap/utils/blob/
|
|
1986
|
+
[isUndefined.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isUndefined.ts#L4)
|
|
1988
1987
|
|
|
1989
1988
|
___
|
|
1990
1989
|
|
|
@@ -2000,7 +1999,7 @@ ___
|
|
|
2000
1999
|
|
|
2001
2000
|
#### Defined in
|
|
2002
2001
|
|
|
2003
|
-
[isWeChat.ts:4](https://github.com/daysnap/utils/blob/
|
|
2002
|
+
[isWeChat.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/isWeChat.ts#L4)
|
|
2004
2003
|
|
|
2005
2004
|
___
|
|
2006
2005
|
|
|
@@ -2017,7 +2016,7 @@ https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html
|
|
|
2017
2016
|
|
|
2018
2017
|
#### Defined in
|
|
2019
2018
|
|
|
2020
|
-
[isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/
|
|
2019
|
+
[isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/isWeChatMiniProgram.ts#L5)
|
|
2021
2020
|
|
|
2022
2021
|
___
|
|
2023
2022
|
|
|
@@ -2037,7 +2036,7 @@ ___
|
|
|
2037
2036
|
|
|
2038
2037
|
#### Defined in
|
|
2039
2038
|
|
|
2040
|
-
[isWeChat.ts:12](https://github.com/daysnap/utils/blob/
|
|
2039
|
+
[isWeChat.ts:12](https://github.com/daysnap/utils/blob/f85d32c/src/isWeChat.ts#L12)
|
|
2041
2040
|
|
|
2042
2041
|
___
|
|
2043
2042
|
|
|
@@ -2059,7 +2058,7 @@ val is Window
|
|
|
2059
2058
|
|
|
2060
2059
|
#### Defined in
|
|
2061
2060
|
|
|
2062
|
-
[isWindow.ts:5](https://github.com/daysnap/utils/blob/
|
|
2061
|
+
[isWindow.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/isWindow.ts#L5)
|
|
2063
2062
|
|
|
2064
2063
|
___
|
|
2065
2064
|
|
|
@@ -2082,7 +2081,7 @@ kebabCase('helloWorld') => hello-world
|
|
|
2082
2081
|
|
|
2083
2082
|
#### Defined in
|
|
2084
2083
|
|
|
2085
|
-
[kebabCase.ts:5](https://github.com/daysnap/utils/blob/
|
|
2084
|
+
[kebabCase.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/kebabCase.ts#L5)
|
|
2086
2085
|
|
|
2087
2086
|
___
|
|
2088
2087
|
|
|
@@ -2111,7 +2110,7 @@ list 生成器,快速生成数据
|
|
|
2111
2110
|
|
|
2112
2111
|
#### Defined in
|
|
2113
2112
|
|
|
2114
|
-
[listGenerator.ts:5](https://github.com/daysnap/utils/blob/
|
|
2113
|
+
[listGenerator.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/listGenerator.ts#L5)
|
|
2115
2114
|
|
|
2116
2115
|
___
|
|
2117
2116
|
|
|
@@ -2136,7 +2135,7 @@ ___
|
|
|
2136
2135
|
|
|
2137
2136
|
#### Defined in
|
|
2138
2137
|
|
|
2139
|
-
[mousewheel.ts:22](https://github.com/daysnap/utils/blob/
|
|
2138
|
+
[mousewheel.ts:22](https://github.com/daysnap/utils/blob/f85d32c/src/mousewheel.ts#L22)
|
|
2140
2139
|
|
|
2141
2140
|
___
|
|
2142
2141
|
|
|
@@ -2158,7 +2157,7 @@ ___
|
|
|
2158
2157
|
|
|
2159
2158
|
#### Defined in
|
|
2160
2159
|
|
|
2161
|
-
[normalizePath.ts:4](https://github.com/daysnap/utils/blob/
|
|
2160
|
+
[normalizePath.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/normalizePath.ts#L4)
|
|
2162
2161
|
|
|
2163
2162
|
___
|
|
2164
2163
|
|
|
@@ -2188,7 +2187,7 @@ ___
|
|
|
2188
2187
|
|
|
2189
2188
|
#### Defined in
|
|
2190
2189
|
|
|
2191
|
-
[omit.ts:4](https://github.com/daysnap/utils/blob/
|
|
2190
|
+
[omit.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/omit.ts#L4)
|
|
2192
2191
|
|
|
2193
2192
|
___
|
|
2194
2193
|
|
|
@@ -2212,7 +2211,7 @@ ___
|
|
|
2212
2211
|
|
|
2213
2212
|
#### Defined in
|
|
2214
2213
|
|
|
2215
|
-
[padding.ts:7](https://github.com/daysnap/utils/blob/
|
|
2214
|
+
[padding.ts:7](https://github.com/daysnap/utils/blob/f85d32c/src/padding.ts#L7)
|
|
2216
2215
|
|
|
2217
2216
|
___
|
|
2218
2217
|
|
|
@@ -2234,7 +2233,7 @@ ___
|
|
|
2234
2233
|
|
|
2235
2234
|
#### Defined in
|
|
2236
2235
|
|
|
2237
|
-
[parseDate.ts:4](https://github.com/daysnap/utils/blob/
|
|
2236
|
+
[parseDate.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/parseDate.ts#L4)
|
|
2238
2237
|
|
|
2239
2238
|
___
|
|
2240
2239
|
|
|
@@ -2257,7 +2256,7 @@ ___
|
|
|
2257
2256
|
|
|
2258
2257
|
#### Defined in
|
|
2259
2258
|
|
|
2260
|
-
[parseError.ts:8](https://github.com/daysnap/utils/blob/
|
|
2259
|
+
[parseError.ts:8](https://github.com/daysnap/utils/blob/f85d32c/src/parseError.ts#L8)
|
|
2261
2260
|
|
|
2262
2261
|
___
|
|
2263
2262
|
|
|
@@ -2287,7 +2286,7 @@ parseObject('a.b.c', 1) => { a: { b: { c: 1 } } }
|
|
|
2287
2286
|
|
|
2288
2287
|
#### Defined in
|
|
2289
2288
|
|
|
2290
|
-
[parseObject.ts:5](https://github.com/daysnap/utils/blob/
|
|
2289
|
+
[parseObject.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/parseObject.ts#L5)
|
|
2291
2290
|
|
|
2292
2291
|
___
|
|
2293
2292
|
|
|
@@ -2316,7 +2315,7 @@ ___
|
|
|
2316
2315
|
|
|
2317
2316
|
#### Defined in
|
|
2318
2317
|
|
|
2319
|
-
[parsePath.ts:6](https://github.com/daysnap/utils/blob/
|
|
2318
|
+
[parsePath.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/parsePath.ts#L6)
|
|
2320
2319
|
|
|
2321
2320
|
___
|
|
2322
2321
|
|
|
@@ -2339,7 +2338,7 @@ ___
|
|
|
2339
2338
|
|
|
2340
2339
|
#### Defined in
|
|
2341
2340
|
|
|
2342
|
-
[parseQuery.ts:8](https://github.com/daysnap/utils/blob/
|
|
2341
|
+
[parseQuery.ts:8](https://github.com/daysnap/utils/blob/f85d32c/src/parseQuery.ts#L8)
|
|
2343
2342
|
|
|
2344
2343
|
___
|
|
2345
2344
|
|
|
@@ -2362,7 +2361,7 @@ pascalCase('hello-world') => HelloWorld
|
|
|
2362
2361
|
|
|
2363
2362
|
#### Defined in
|
|
2364
2363
|
|
|
2365
|
-
[pascalCase.ts:8](https://github.com/daysnap/utils/blob/
|
|
2364
|
+
[pascalCase.ts:8](https://github.com/daysnap/utils/blob/f85d32c/src/pascalCase.ts#L8)
|
|
2366
2365
|
|
|
2367
2366
|
___
|
|
2368
2367
|
|
|
@@ -2392,7 +2391,7 @@ ___
|
|
|
2392
2391
|
|
|
2393
2392
|
#### Defined in
|
|
2394
2393
|
|
|
2395
|
-
[pick.ts:4](https://github.com/daysnap/utils/blob/
|
|
2394
|
+
[pick.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/pick.ts#L4)
|
|
2396
2395
|
|
|
2397
2396
|
___
|
|
2398
2397
|
|
|
@@ -2415,7 +2414,7 @@ ___
|
|
|
2415
2414
|
|
|
2416
2415
|
#### Defined in
|
|
2417
2416
|
|
|
2418
|
-
[replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/
|
|
2417
|
+
[replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/replaceCrlf.ts#L4)
|
|
2419
2418
|
|
|
2420
2419
|
___
|
|
2421
2420
|
|
|
@@ -2439,7 +2438,7 @@ ___
|
|
|
2439
2438
|
|
|
2440
2439
|
#### Defined in
|
|
2441
2440
|
|
|
2442
|
-
[requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/
|
|
2441
|
+
[requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/requestFullScreen.ts#L6)
|
|
2443
2442
|
|
|
2444
2443
|
___
|
|
2445
2444
|
|
|
@@ -2465,7 +2464,7 @@ reserve(0, '--') => 0
|
|
|
2465
2464
|
|
|
2466
2465
|
#### Defined in
|
|
2467
2466
|
|
|
2468
|
-
[reserve.ts:8](https://github.com/daysnap/utils/blob/
|
|
2467
|
+
[reserve.ts:8](https://github.com/daysnap/utils/blob/f85d32c/src/reserve.ts#L8)
|
|
2469
2468
|
|
|
2470
2469
|
___
|
|
2471
2470
|
|
|
@@ -2489,7 +2488,7 @@ ___
|
|
|
2489
2488
|
|
|
2490
2489
|
#### Defined in
|
|
2491
2490
|
|
|
2492
|
-
[rgbToHex.ts:4](https://github.com/daysnap/utils/blob/
|
|
2491
|
+
[rgbToHex.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/rgbToHex.ts#L4)
|
|
2493
2492
|
|
|
2494
2493
|
___
|
|
2495
2494
|
|
|
@@ -2512,7 +2511,7 @@ ___
|
|
|
2512
2511
|
|
|
2513
2512
|
#### Defined in
|
|
2514
2513
|
|
|
2515
|
-
[round.ts:6](https://github.com/daysnap/utils/blob/
|
|
2514
|
+
[round.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/round.ts#L6)
|
|
2516
2515
|
|
|
2517
2516
|
___
|
|
2518
2517
|
|
|
@@ -2528,7 +2527,7 @@ ___
|
|
|
2528
2527
|
|
|
2529
2528
|
#### Defined in
|
|
2530
2529
|
|
|
2531
|
-
[scrollToTop.ts:4](https://github.com/daysnap/utils/blob/
|
|
2530
|
+
[scrollToTop.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/scrollToTop.ts#L4)
|
|
2532
2531
|
|
|
2533
2532
|
___
|
|
2534
2533
|
|
|
@@ -2551,7 +2550,7 @@ ___
|
|
|
2551
2550
|
|
|
2552
2551
|
#### Defined in
|
|
2553
2552
|
|
|
2554
|
-
[sleep.ts:6](https://github.com/daysnap/utils/blob/
|
|
2553
|
+
[sleep.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/sleep.ts#L6)
|
|
2555
2554
|
|
|
2556
2555
|
___
|
|
2557
2556
|
|
|
@@ -2580,7 +2579,7 @@ ___
|
|
|
2580
2579
|
|
|
2581
2580
|
#### Defined in
|
|
2582
2581
|
|
|
2583
|
-
[splitArray.ts:4](https://github.com/daysnap/utils/blob/
|
|
2582
|
+
[splitArray.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/splitArray.ts#L4)
|
|
2584
2583
|
|
|
2585
2584
|
___
|
|
2586
2585
|
|
|
@@ -2603,7 +2602,7 @@ ___
|
|
|
2603
2602
|
|
|
2604
2603
|
#### Defined in
|
|
2605
2604
|
|
|
2606
|
-
[stringTrim.ts:6](https://github.com/daysnap/utils/blob/
|
|
2605
|
+
[stringTrim.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/stringTrim.ts#L6)
|
|
2607
2606
|
|
|
2608
2607
|
___
|
|
2609
2608
|
|
|
@@ -2625,7 +2624,7 @@ ___
|
|
|
2625
2624
|
|
|
2626
2625
|
#### Defined in
|
|
2627
2626
|
|
|
2628
|
-
[stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/
|
|
2627
|
+
[stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/f85d32c/src/stringifyQuery.ts#L7)
|
|
2629
2628
|
|
|
2630
2629
|
___
|
|
2631
2630
|
|
|
@@ -2668,7 +2667,7 @@ ___
|
|
|
2668
2667
|
|
|
2669
2668
|
#### Defined in
|
|
2670
2669
|
|
|
2671
|
-
[throttle.ts:5](https://github.com/daysnap/utils/blob/
|
|
2670
|
+
[throttle.ts:5](https://github.com/daysnap/utils/blob/f85d32c/src/throttle.ts#L5)
|
|
2672
2671
|
|
|
2673
2672
|
___
|
|
2674
2673
|
|
|
@@ -2690,7 +2689,7 @@ ___
|
|
|
2690
2689
|
|
|
2691
2690
|
#### Defined in
|
|
2692
2691
|
|
|
2693
|
-
[toCDB.ts:4](https://github.com/daysnap/utils/blob/
|
|
2692
|
+
[toCDB.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/toCDB.ts#L4)
|
|
2694
2693
|
|
|
2695
2694
|
___
|
|
2696
2695
|
|
|
@@ -2712,7 +2711,7 @@ ___
|
|
|
2712
2711
|
|
|
2713
2712
|
#### Defined in
|
|
2714
2713
|
|
|
2715
|
-
[toDBC.ts:4](https://github.com/daysnap/utils/blob/
|
|
2714
|
+
[toDBC.ts:4](https://github.com/daysnap/utils/blob/f85d32c/src/toDBC.ts#L4)
|
|
2716
2715
|
|
|
2717
2716
|
___
|
|
2718
2717
|
|
|
@@ -2736,4 +2735,4 @@ ___
|
|
|
2736
2735
|
|
|
2737
2736
|
#### Defined in
|
|
2738
2737
|
|
|
2739
|
-
[typeOf.ts:6](https://github.com/daysnap/utils/blob/
|
|
2738
|
+
[typeOf.ts:6](https://github.com/daysnap/utils/blob/f85d32c/src/typeOf.ts#L6)
|
package/es/formatAmount.d.ts
CHANGED
package/es/formatAmount.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 格式化金额,默认元
|
|
3
3
|
*/
|
|
4
|
-
export function formatAmount(s, radix = 1
|
|
4
|
+
export function formatAmount(s, radix = 1) {
|
|
5
5
|
const money = parseFloat(s === null || s === void 0 ? void 0 : s.toString());
|
|
6
6
|
if (money) {
|
|
7
7
|
// eslint-disable-next-line no-param-reassign
|
|
8
|
-
s = `${(money / radix).toFixed(
|
|
8
|
+
s = `${(money / radix).toFixed(2)}`;
|
|
9
9
|
const l = s.split('.')[0].split('').reverse();
|
|
10
10
|
const r = s.split('.')[1];
|
|
11
11
|
let t = '';
|
package/es/formatMessage.js
CHANGED
|
@@ -8,7 +8,7 @@ import { parsePath } from './parsePath';
|
|
|
8
8
|
* formatMessage({ a: '123', b: { ba: '456' } }, ['b.ba']) => '456'
|
|
9
9
|
*/
|
|
10
10
|
export function formatMessage(message, keys = ['message', 'msg', 'errorMsg']) {
|
|
11
|
-
if (isNull(message)) {
|
|
11
|
+
if (isNull(message) || isUndefined(message)) {
|
|
12
12
|
return '';
|
|
13
13
|
}
|
|
14
14
|
if (!isObject(message)) {
|
package/lib/formatAmount.d.ts
CHANGED
package/lib/formatAmount.js
CHANGED
|
@@ -4,11 +4,11 @@ exports.formatAmount = void 0;
|
|
|
4
4
|
/**
|
|
5
5
|
* 格式化金额,默认元
|
|
6
6
|
*/
|
|
7
|
-
function formatAmount(s, radix = 1
|
|
7
|
+
function formatAmount(s, radix = 1) {
|
|
8
8
|
const money = parseFloat(s === null || s === void 0 ? void 0 : s.toString());
|
|
9
9
|
if (money) {
|
|
10
10
|
// eslint-disable-next-line no-param-reassign
|
|
11
|
-
s = `${(money / radix).toFixed(
|
|
11
|
+
s = `${(money / radix).toFixed(2)}`;
|
|
12
12
|
const l = s.split('.')[0].split('').reverse();
|
|
13
13
|
const r = s.split('.')[1];
|
|
14
14
|
let t = '';
|
package/lib/formatMessage.js
CHANGED
|
@@ -11,7 +11,7 @@ const parsePath_1 = require("./parsePath");
|
|
|
11
11
|
* formatMessage({ a: '123', b: { ba: '456' } }, ['b.ba']) => '456'
|
|
12
12
|
*/
|
|
13
13
|
function formatMessage(message, keys = ['message', 'msg', 'errorMsg']) {
|
|
14
|
-
if ((0, isNull_1.isNull)(message)) {
|
|
14
|
+
if ((0, isNull_1.isNull)(message) || (0, isUndefined_1.isUndefined)(message)) {
|
|
15
15
|
return '';
|
|
16
16
|
}
|
|
17
17
|
if (!(0, isObject_1.isObject)(message)) {
|