@daysnap/utils 0.0.40 → 0.0.41
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/modules.md +66 -66
- package/es/formatAmount.js +2 -1
- package/lib/formatAmount.js +2 -1
- package/package.json +1 -1
package/docs/modules.md
CHANGED
|
@@ -93,7 +93,7 @@ base64 转 blob
|
|
|
93
93
|
|
|
94
94
|
#### Defined in
|
|
95
95
|
|
|
96
|
-
[base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/
|
|
96
|
+
[base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/f509d77/src/base64ToBlob.ts#L6)
|
|
97
97
|
|
|
98
98
|
___
|
|
99
99
|
|
|
@@ -115,7 +115,7 @@ blob 转 base64
|
|
|
115
115
|
|
|
116
116
|
#### Defined in
|
|
117
117
|
|
|
118
|
-
[blobToBase64.ts:4](https://github.com/daysnap/utils/blob/
|
|
118
|
+
[blobToBase64.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/blobToBase64.ts#L4)
|
|
119
119
|
|
|
120
120
|
___
|
|
121
121
|
|
|
@@ -139,7 +139,7 @@ canvas 转 blob 文件
|
|
|
139
139
|
|
|
140
140
|
#### Defined in
|
|
141
141
|
|
|
142
|
-
canvasToBlob.ts:4
|
|
142
|
+
[canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/canvasToBlob.ts#L4)
|
|
143
143
|
|
|
144
144
|
___
|
|
145
145
|
|
|
@@ -167,7 +167,7 @@ ___
|
|
|
167
167
|
|
|
168
168
|
#### Defined in
|
|
169
169
|
|
|
170
|
-
[clone.ts:7](https://github.com/daysnap/utils/blob/
|
|
170
|
+
[clone.ts:7](https://github.com/daysnap/utils/blob/f509d77/src/clone.ts#L7)
|
|
171
171
|
|
|
172
172
|
___
|
|
173
173
|
|
|
@@ -189,7 +189,7 @@ ___
|
|
|
189
189
|
|
|
190
190
|
#### Defined in
|
|
191
191
|
|
|
192
|
-
[createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/
|
|
192
|
+
[createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/createHexColorByHash.ts#L4)
|
|
193
193
|
|
|
194
194
|
___
|
|
195
195
|
|
|
@@ -215,7 +215,7 @@ ___
|
|
|
215
215
|
|
|
216
216
|
#### Defined in
|
|
217
217
|
|
|
218
|
-
[compareVersion.ts:9](https://github.com/daysnap/utils/blob/
|
|
218
|
+
[compareVersion.ts:9](https://github.com/daysnap/utils/blob/f509d77/src/compareVersion.ts#L9)
|
|
219
219
|
|
|
220
220
|
___
|
|
221
221
|
|
|
@@ -237,7 +237,7 @@ ___
|
|
|
237
237
|
|
|
238
238
|
#### Defined in
|
|
239
239
|
|
|
240
|
-
[compressImage.ts:6](https://github.com/daysnap/utils/blob/
|
|
240
|
+
[compressImage.ts:6](https://github.com/daysnap/utils/blob/f509d77/src/compressImage.ts#L6)
|
|
241
241
|
|
|
242
242
|
___
|
|
243
243
|
|
|
@@ -261,7 +261,7 @@ ___
|
|
|
261
261
|
|
|
262
262
|
#### Defined in
|
|
263
263
|
|
|
264
|
-
[downloadFile.ts:4](https://github.com/daysnap/utils/blob/
|
|
264
|
+
[downloadFile.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/downloadFile.ts#L4)
|
|
265
265
|
|
|
266
266
|
___
|
|
267
267
|
|
|
@@ -290,7 +290,7 @@ ___
|
|
|
290
290
|
|
|
291
291
|
#### Defined in
|
|
292
292
|
|
|
293
|
-
[each.ts:4](https://github.com/daysnap/utils/blob/
|
|
293
|
+
[each.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/each.ts#L4)
|
|
294
294
|
|
|
295
295
|
▸ **each**<`T`\>(`data`, `callback`): `void`
|
|
296
296
|
|
|
@@ -313,7 +313,7 @@ ___
|
|
|
313
313
|
|
|
314
314
|
#### Defined in
|
|
315
315
|
|
|
316
|
-
[each.ts:8](https://github.com/daysnap/utils/blob/
|
|
316
|
+
[each.ts:8](https://github.com/daysnap/utils/blob/f509d77/src/each.ts#L8)
|
|
317
317
|
|
|
318
318
|
___
|
|
319
319
|
|
|
@@ -335,7 +335,7 @@ ___
|
|
|
335
335
|
|
|
336
336
|
#### Defined in
|
|
337
337
|
|
|
338
|
-
[filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/
|
|
338
|
+
[filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/filterBankCardNo.ts#L4)
|
|
339
339
|
|
|
340
340
|
___
|
|
341
341
|
|
|
@@ -357,7 +357,7 @@ ___
|
|
|
357
357
|
|
|
358
358
|
#### Defined in
|
|
359
359
|
|
|
360
|
-
[filterCRLF.ts:4](https://github.com/daysnap/utils/blob/
|
|
360
|
+
[filterCRLF.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/filterCRLF.ts#L4)
|
|
361
361
|
|
|
362
362
|
___
|
|
363
363
|
|
|
@@ -379,7 +379,7 @@ ___
|
|
|
379
379
|
|
|
380
380
|
#### Defined in
|
|
381
381
|
|
|
382
|
-
[filterEmoji.ts:4](https://github.com/daysnap/utils/blob/
|
|
382
|
+
[filterEmoji.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/filterEmoji.ts#L4)
|
|
383
383
|
|
|
384
384
|
___
|
|
385
385
|
|
|
@@ -401,7 +401,7 @@ ___
|
|
|
401
401
|
|
|
402
402
|
#### Defined in
|
|
403
403
|
|
|
404
|
-
[filterIdCard.ts:4](https://github.com/daysnap/utils/blob/
|
|
404
|
+
[filterIdCard.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/filterIdCard.ts#L4)
|
|
405
405
|
|
|
406
406
|
___
|
|
407
407
|
|
|
@@ -423,7 +423,7 @@ ___
|
|
|
423
423
|
|
|
424
424
|
#### Defined in
|
|
425
425
|
|
|
426
|
-
[filterName.ts:4](https://github.com/daysnap/utils/blob/
|
|
426
|
+
[filterName.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/filterName.ts#L4)
|
|
427
427
|
|
|
428
428
|
___
|
|
429
429
|
|
|
@@ -448,7 +448,7 @@ filterPhone('13177778888', ' ') => 131 **** 8888
|
|
|
448
448
|
|
|
449
449
|
#### Defined in
|
|
450
450
|
|
|
451
|
-
[filterPhone.ts:6](https://github.com/daysnap/utils/blob/
|
|
451
|
+
[filterPhone.ts:6](https://github.com/daysnap/utils/blob/f509d77/src/filterPhone.ts#L6)
|
|
452
452
|
|
|
453
453
|
___
|
|
454
454
|
|
|
@@ -471,7 +471,7 @@ ___
|
|
|
471
471
|
|
|
472
472
|
#### Defined in
|
|
473
473
|
|
|
474
|
-
[formatAmount.ts:4](https://github.com/daysnap/utils/blob/
|
|
474
|
+
[formatAmount.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/formatAmount.ts#L4)
|
|
475
475
|
|
|
476
476
|
___
|
|
477
477
|
|
|
@@ -494,7 +494,7 @@ ___
|
|
|
494
494
|
|
|
495
495
|
#### Defined in
|
|
496
496
|
|
|
497
|
-
[formatDate.ts:6](https://github.com/daysnap/utils/blob/
|
|
497
|
+
[formatDate.ts:6](https://github.com/daysnap/utils/blob/f509d77/src/formatDate.ts#L6)
|
|
498
498
|
|
|
499
499
|
___
|
|
500
500
|
|
|
@@ -516,7 +516,7 @@ ___
|
|
|
516
516
|
|
|
517
517
|
#### Defined in
|
|
518
518
|
|
|
519
|
-
[getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/
|
|
519
|
+
[getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/getBlobByUrl.ts#L4)
|
|
520
520
|
|
|
521
521
|
___
|
|
522
522
|
|
|
@@ -539,7 +539,7 @@ ___
|
|
|
539
539
|
|
|
540
540
|
#### Defined in
|
|
541
541
|
|
|
542
|
-
[storage/index.ts:7](https://github.com/daysnap/utils/blob/
|
|
542
|
+
[storage/index.ts:7](https://github.com/daysnap/utils/blob/f509d77/src/storage/index.ts#L7)
|
|
543
543
|
|
|
544
544
|
___
|
|
545
545
|
|
|
@@ -561,7 +561,7 @@ ___
|
|
|
561
561
|
|
|
562
562
|
#### Defined in
|
|
563
563
|
|
|
564
|
-
[getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/
|
|
564
|
+
[getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/getDayMillisecond.ts#L4)
|
|
565
565
|
|
|
566
566
|
___
|
|
567
567
|
|
|
@@ -583,7 +583,7 @@ ___
|
|
|
583
583
|
|
|
584
584
|
#### Defined in
|
|
585
585
|
|
|
586
|
-
[getImageInfo.ts:4](https://github.com/daysnap/utils/blob/
|
|
586
|
+
[getImageInfo.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/getImageInfo.ts#L4)
|
|
587
587
|
|
|
588
588
|
___
|
|
589
589
|
|
|
@@ -606,7 +606,7 @@ ___
|
|
|
606
606
|
|
|
607
607
|
#### Defined in
|
|
608
608
|
|
|
609
|
-
[storage/index.ts:7](https://github.com/daysnap/utils/blob/
|
|
609
|
+
[storage/index.ts:7](https://github.com/daysnap/utils/blob/f509d77/src/storage/index.ts#L7)
|
|
610
610
|
|
|
611
611
|
___
|
|
612
612
|
|
|
@@ -622,7 +622,7 @@ ___
|
|
|
622
622
|
|
|
623
623
|
#### Defined in
|
|
624
624
|
|
|
625
|
-
[getRandomColor.ts:4](https://github.com/daysnap/utils/blob/
|
|
625
|
+
[getRandomColor.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/getRandomColor.ts#L4)
|
|
626
626
|
|
|
627
627
|
___
|
|
628
628
|
|
|
@@ -644,7 +644,7 @@ ___
|
|
|
644
644
|
|
|
645
645
|
#### Defined in
|
|
646
646
|
|
|
647
|
-
[getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/
|
|
647
|
+
[getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/getVideoInfo.ts#L4)
|
|
648
648
|
|
|
649
649
|
___
|
|
650
650
|
|
|
@@ -660,7 +660,7 @@ ___
|
|
|
660
660
|
|
|
661
661
|
#### Defined in
|
|
662
662
|
|
|
663
|
-
[inBrowser.ts:4](https://github.com/daysnap/utils/blob/
|
|
663
|
+
[inBrowser.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/inBrowser.ts#L4)
|
|
664
664
|
|
|
665
665
|
___
|
|
666
666
|
|
|
@@ -676,7 +676,7 @@ ___
|
|
|
676
676
|
|
|
677
677
|
#### Defined in
|
|
678
678
|
|
|
679
|
-
[isAndroid.ts:4](https://github.com/daysnap/utils/blob/
|
|
679
|
+
[isAndroid.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isAndroid.ts#L4)
|
|
680
680
|
|
|
681
681
|
___
|
|
682
682
|
|
|
@@ -700,7 +700,7 @@ val is any[]
|
|
|
700
700
|
|
|
701
701
|
#### Defined in
|
|
702
702
|
|
|
703
|
-
[isArray.ts:6](https://github.com/daysnap/utils/blob/
|
|
703
|
+
[isArray.ts:6](https://github.com/daysnap/utils/blob/f509d77/src/isArray.ts#L6)
|
|
704
704
|
|
|
705
705
|
___
|
|
706
706
|
|
|
@@ -722,7 +722,7 @@ val is boolean
|
|
|
722
722
|
|
|
723
723
|
#### Defined in
|
|
724
724
|
|
|
725
|
-
[isBoolean.ts:5](https://github.com/daysnap/utils/blob/
|
|
725
|
+
[isBoolean.ts:5](https://github.com/daysnap/utils/blob/f509d77/src/isBoolean.ts#L5)
|
|
726
726
|
|
|
727
727
|
___
|
|
728
728
|
|
|
@@ -744,7 +744,7 @@ ___
|
|
|
744
744
|
|
|
745
745
|
#### Defined in
|
|
746
746
|
|
|
747
|
-
[isEmail.ts:4](https://github.com/daysnap/utils/blob/
|
|
747
|
+
[isEmail.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isEmail.ts#L4)
|
|
748
748
|
|
|
749
749
|
___
|
|
750
750
|
|
|
@@ -766,7 +766,7 @@ ___
|
|
|
766
766
|
|
|
767
767
|
#### Defined in
|
|
768
768
|
|
|
769
|
-
[isEmpty.ts:6](https://github.com/daysnap/utils/blob/
|
|
769
|
+
[isEmpty.ts:6](https://github.com/daysnap/utils/blob/f509d77/src/isEmpty.ts#L6)
|
|
770
770
|
|
|
771
771
|
___
|
|
772
772
|
|
|
@@ -788,7 +788,7 @@ ___
|
|
|
788
788
|
|
|
789
789
|
#### Defined in
|
|
790
790
|
|
|
791
|
-
[isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/
|
|
791
|
+
[isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/f509d77/src/isEmptyObject.ts#L5)
|
|
792
792
|
|
|
793
793
|
___
|
|
794
794
|
|
|
@@ -810,7 +810,7 @@ val is Error
|
|
|
810
810
|
|
|
811
811
|
#### Defined in
|
|
812
812
|
|
|
813
|
-
[isError.ts:4](https://github.com/daysnap/utils/blob/
|
|
813
|
+
[isError.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isError.ts#L4)
|
|
814
814
|
|
|
815
815
|
___
|
|
816
816
|
|
|
@@ -832,7 +832,7 @@ val is Function
|
|
|
832
832
|
|
|
833
833
|
#### Defined in
|
|
834
834
|
|
|
835
|
-
[isFunction.ts:4](https://github.com/daysnap/utils/blob/
|
|
835
|
+
[isFunction.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isFunction.ts#L4)
|
|
836
836
|
|
|
837
837
|
___
|
|
838
838
|
|
|
@@ -848,7 +848,7 @@ ___
|
|
|
848
848
|
|
|
849
849
|
#### Defined in
|
|
850
850
|
|
|
851
|
-
[isIOS.ts:4](https://github.com/daysnap/utils/blob/
|
|
851
|
+
[isIOS.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isIOS.ts#L4)
|
|
852
852
|
|
|
853
853
|
___
|
|
854
854
|
|
|
@@ -870,7 +870,7 @@ ___
|
|
|
870
870
|
|
|
871
871
|
#### Defined in
|
|
872
872
|
|
|
873
|
-
[isIdCard.ts:4](https://github.com/daysnap/utils/blob/
|
|
873
|
+
[isIdCard.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isIdCard.ts#L4)
|
|
874
874
|
|
|
875
875
|
___
|
|
876
876
|
|
|
@@ -892,7 +892,7 @@ ___
|
|
|
892
892
|
|
|
893
893
|
#### Defined in
|
|
894
894
|
|
|
895
|
-
[isJSONString.ts:7](https://github.com/daysnap/utils/blob/
|
|
895
|
+
[isJSONString.ts:7](https://github.com/daysnap/utils/blob/f509d77/src/isJSONString.ts#L7)
|
|
896
896
|
|
|
897
897
|
___
|
|
898
898
|
|
|
@@ -914,7 +914,7 @@ ___
|
|
|
914
914
|
|
|
915
915
|
#### Defined in
|
|
916
916
|
|
|
917
|
-
[isLan.ts:5](https://github.com/daysnap/utils/blob/
|
|
917
|
+
[isLan.ts:5](https://github.com/daysnap/utils/blob/f509d77/src/isLan.ts#L5)
|
|
918
918
|
|
|
919
919
|
___
|
|
920
920
|
|
|
@@ -936,7 +936,7 @@ ___
|
|
|
936
936
|
|
|
937
937
|
#### Defined in
|
|
938
938
|
|
|
939
|
-
[isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/
|
|
939
|
+
[isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/f509d77/src/isLicenseCode.ts#L5)
|
|
940
940
|
|
|
941
941
|
___
|
|
942
942
|
|
|
@@ -952,7 +952,7 @@ ___
|
|
|
952
952
|
|
|
953
953
|
#### Defined in
|
|
954
954
|
|
|
955
|
-
[isMobile.ts:4](https://github.com/daysnap/utils/blob/
|
|
955
|
+
[isMobile.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isMobile.ts#L4)
|
|
956
956
|
|
|
957
957
|
___
|
|
958
958
|
|
|
@@ -974,7 +974,7 @@ val is null
|
|
|
974
974
|
|
|
975
975
|
#### Defined in
|
|
976
976
|
|
|
977
|
-
[isNull.ts:4](https://github.com/daysnap/utils/blob/
|
|
977
|
+
[isNull.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isNull.ts#L4)
|
|
978
978
|
|
|
979
979
|
___
|
|
980
980
|
|
|
@@ -996,7 +996,7 @@ val is number
|
|
|
996
996
|
|
|
997
997
|
#### Defined in
|
|
998
998
|
|
|
999
|
-
[isNumber.ts:5](https://github.com/daysnap/utils/blob/
|
|
999
|
+
[isNumber.ts:5](https://github.com/daysnap/utils/blob/f509d77/src/isNumber.ts#L5)
|
|
1000
1000
|
|
|
1001
1001
|
___
|
|
1002
1002
|
|
|
@@ -1018,7 +1018,7 @@ val is Record<string, any\>
|
|
|
1018
1018
|
|
|
1019
1019
|
#### Defined in
|
|
1020
1020
|
|
|
1021
|
-
[isObject.ts:4](https://github.com/daysnap/utils/blob/
|
|
1021
|
+
[isObject.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isObject.ts#L4)
|
|
1022
1022
|
|
|
1023
1023
|
___
|
|
1024
1024
|
|
|
@@ -1040,7 +1040,7 @@ ___
|
|
|
1040
1040
|
|
|
1041
1041
|
#### Defined in
|
|
1042
1042
|
|
|
1043
|
-
[isPhone.ts:4](https://github.com/daysnap/utils/blob/
|
|
1043
|
+
[isPhone.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isPhone.ts#L4)
|
|
1044
1044
|
|
|
1045
1045
|
___
|
|
1046
1046
|
|
|
@@ -1068,7 +1068,7 @@ val is Promise<T\>
|
|
|
1068
1068
|
|
|
1069
1069
|
#### Defined in
|
|
1070
1070
|
|
|
1071
|
-
[isPromise.ts:4](https://github.com/daysnap/utils/blob/
|
|
1071
|
+
[isPromise.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isPromise.ts#L4)
|
|
1072
1072
|
|
|
1073
1073
|
___
|
|
1074
1074
|
|
|
@@ -1090,7 +1090,7 @@ val is RegExp
|
|
|
1090
1090
|
|
|
1091
1091
|
#### Defined in
|
|
1092
1092
|
|
|
1093
|
-
[isRegExp.ts:4](https://github.com/daysnap/utils/blob/
|
|
1093
|
+
[isRegExp.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isRegExp.ts#L4)
|
|
1094
1094
|
|
|
1095
1095
|
___
|
|
1096
1096
|
|
|
@@ -1112,7 +1112,7 @@ val is string
|
|
|
1112
1112
|
|
|
1113
1113
|
#### Defined in
|
|
1114
1114
|
|
|
1115
|
-
[isString.ts:4](https://github.com/daysnap/utils/blob/
|
|
1115
|
+
[isString.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isString.ts#L4)
|
|
1116
1116
|
|
|
1117
1117
|
___
|
|
1118
1118
|
|
|
@@ -1134,7 +1134,7 @@ val is undefined
|
|
|
1134
1134
|
|
|
1135
1135
|
#### Defined in
|
|
1136
1136
|
|
|
1137
|
-
[isUndefined.ts:4](https://github.com/daysnap/utils/blob/
|
|
1137
|
+
[isUndefined.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isUndefined.ts#L4)
|
|
1138
1138
|
|
|
1139
1139
|
___
|
|
1140
1140
|
|
|
@@ -1150,7 +1150,7 @@ ___
|
|
|
1150
1150
|
|
|
1151
1151
|
#### Defined in
|
|
1152
1152
|
|
|
1153
|
-
[isWeixin.ts:4](https://github.com/daysnap/utils/blob/
|
|
1153
|
+
[isWeixin.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/isWeixin.ts#L4)
|
|
1154
1154
|
|
|
1155
1155
|
___
|
|
1156
1156
|
|
|
@@ -1172,7 +1172,7 @@ val is Window
|
|
|
1172
1172
|
|
|
1173
1173
|
#### Defined in
|
|
1174
1174
|
|
|
1175
|
-
[isWindow.ts:5](https://github.com/daysnap/utils/blob/
|
|
1175
|
+
[isWindow.ts:5](https://github.com/daysnap/utils/blob/f509d77/src/isWindow.ts#L5)
|
|
1176
1176
|
|
|
1177
1177
|
___
|
|
1178
1178
|
|
|
@@ -1196,7 +1196,7 @@ ___
|
|
|
1196
1196
|
|
|
1197
1197
|
#### Defined in
|
|
1198
1198
|
|
|
1199
|
-
[loadResource.ts:9](https://github.com/daysnap/utils/blob/
|
|
1199
|
+
[loadResource.ts:9](https://github.com/daysnap/utils/blob/f509d77/src/loadResource.ts#L9)
|
|
1200
1200
|
|
|
1201
1201
|
___
|
|
1202
1202
|
|
|
@@ -1226,7 +1226,7 @@ ___
|
|
|
1226
1226
|
|
|
1227
1227
|
#### Defined in
|
|
1228
1228
|
|
|
1229
|
-
[omit.ts:4](https://github.com/daysnap/utils/blob/
|
|
1229
|
+
[omit.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/omit.ts#L4)
|
|
1230
1230
|
|
|
1231
1231
|
___
|
|
1232
1232
|
|
|
@@ -1250,7 +1250,7 @@ ___
|
|
|
1250
1250
|
|
|
1251
1251
|
#### Defined in
|
|
1252
1252
|
|
|
1253
|
-
[padding.ts:7](https://github.com/daysnap/utils/blob/
|
|
1253
|
+
[padding.ts:7](https://github.com/daysnap/utils/blob/f509d77/src/padding.ts#L7)
|
|
1254
1254
|
|
|
1255
1255
|
___
|
|
1256
1256
|
|
|
@@ -1272,7 +1272,7 @@ ___
|
|
|
1272
1272
|
|
|
1273
1273
|
#### Defined in
|
|
1274
1274
|
|
|
1275
|
-
[parseDate.ts:4](https://github.com/daysnap/utils/blob/
|
|
1275
|
+
[parseDate.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/parseDate.ts#L4)
|
|
1276
1276
|
|
|
1277
1277
|
___
|
|
1278
1278
|
|
|
@@ -1295,7 +1295,7 @@ ___
|
|
|
1295
1295
|
|
|
1296
1296
|
#### Defined in
|
|
1297
1297
|
|
|
1298
|
-
[parseError.ts:8](https://github.com/daysnap/utils/blob/
|
|
1298
|
+
[parseError.ts:8](https://github.com/daysnap/utils/blob/f509d77/src/parseError.ts#L8)
|
|
1299
1299
|
|
|
1300
1300
|
___
|
|
1301
1301
|
|
|
@@ -1324,7 +1324,7 @@ ___
|
|
|
1324
1324
|
|
|
1325
1325
|
#### Defined in
|
|
1326
1326
|
|
|
1327
|
-
[parseObject.ts:4](https://github.com/daysnap/utils/blob/
|
|
1327
|
+
[parseObject.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/parseObject.ts#L4)
|
|
1328
1328
|
|
|
1329
1329
|
___
|
|
1330
1330
|
|
|
@@ -1353,7 +1353,7 @@ ___
|
|
|
1353
1353
|
|
|
1354
1354
|
#### Defined in
|
|
1355
1355
|
|
|
1356
|
-
[parsePath.ts:4](https://github.com/daysnap/utils/blob/
|
|
1356
|
+
[parsePath.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/parsePath.ts#L4)
|
|
1357
1357
|
|
|
1358
1358
|
___
|
|
1359
1359
|
|
|
@@ -1376,7 +1376,7 @@ ___
|
|
|
1376
1376
|
|
|
1377
1377
|
#### Defined in
|
|
1378
1378
|
|
|
1379
|
-
[parseQuery.ts:8](https://github.com/daysnap/utils/blob/
|
|
1379
|
+
[parseQuery.ts:8](https://github.com/daysnap/utils/blob/f509d77/src/parseQuery.ts#L8)
|
|
1380
1380
|
|
|
1381
1381
|
___
|
|
1382
1382
|
|
|
@@ -1406,7 +1406,7 @@ ___
|
|
|
1406
1406
|
|
|
1407
1407
|
#### Defined in
|
|
1408
1408
|
|
|
1409
|
-
[pick.ts:4](https://github.com/daysnap/utils/blob/
|
|
1409
|
+
[pick.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/pick.ts#L4)
|
|
1410
1410
|
|
|
1411
1411
|
___
|
|
1412
1412
|
|
|
@@ -1429,7 +1429,7 @@ ___
|
|
|
1429
1429
|
|
|
1430
1430
|
#### Defined in
|
|
1431
1431
|
|
|
1432
|
-
[replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/
|
|
1432
|
+
[replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/replaceCrlf.ts#L4)
|
|
1433
1433
|
|
|
1434
1434
|
___
|
|
1435
1435
|
|
|
@@ -1455,7 +1455,7 @@ reserve(0, '--') => 0
|
|
|
1455
1455
|
|
|
1456
1456
|
#### Defined in
|
|
1457
1457
|
|
|
1458
|
-
[reserve.ts:8](https://github.com/daysnap/utils/blob/
|
|
1458
|
+
[reserve.ts:8](https://github.com/daysnap/utils/blob/f509d77/src/reserve.ts#L8)
|
|
1459
1459
|
|
|
1460
1460
|
___
|
|
1461
1461
|
|
|
@@ -1478,7 +1478,7 @@ ___
|
|
|
1478
1478
|
|
|
1479
1479
|
#### Defined in
|
|
1480
1480
|
|
|
1481
|
-
[round.ts:6](https://github.com/daysnap/utils/blob/
|
|
1481
|
+
[round.ts:6](https://github.com/daysnap/utils/blob/f509d77/src/round.ts#L6)
|
|
1482
1482
|
|
|
1483
1483
|
___
|
|
1484
1484
|
|
|
@@ -1501,7 +1501,7 @@ ___
|
|
|
1501
1501
|
|
|
1502
1502
|
#### Defined in
|
|
1503
1503
|
|
|
1504
|
-
[sleep.ts:4](https://github.com/daysnap/utils/blob/
|
|
1504
|
+
[sleep.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/sleep.ts#L4)
|
|
1505
1505
|
|
|
1506
1506
|
___
|
|
1507
1507
|
|
|
@@ -1524,7 +1524,7 @@ ___
|
|
|
1524
1524
|
|
|
1525
1525
|
#### Defined in
|
|
1526
1526
|
|
|
1527
|
-
[stringTrim.ts:4](https://github.com/daysnap/utils/blob/
|
|
1527
|
+
[stringTrim.ts:4](https://github.com/daysnap/utils/blob/f509d77/src/stringTrim.ts#L4)
|
|
1528
1528
|
|
|
1529
1529
|
___
|
|
1530
1530
|
|
|
@@ -1546,7 +1546,7 @@ ___
|
|
|
1546
1546
|
|
|
1547
1547
|
#### Defined in
|
|
1548
1548
|
|
|
1549
|
-
[stringifyQuery.ts:6](https://github.com/daysnap/utils/blob/
|
|
1549
|
+
[stringifyQuery.ts:6](https://github.com/daysnap/utils/blob/f509d77/src/stringifyQuery.ts#L6)
|
|
1550
1550
|
|
|
1551
1551
|
___
|
|
1552
1552
|
|
|
@@ -1576,4 +1576,4 @@ val is T
|
|
|
1576
1576
|
|
|
1577
1577
|
#### Defined in
|
|
1578
1578
|
|
|
1579
|
-
[typeOf.ts:6](https://github.com/daysnap/utils/blob/
|
|
1579
|
+
[typeOf.ts:6](https://github.com/daysnap/utils/blob/f509d77/src/typeOf.ts#L6)
|
package/es/formatAmount.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* 格式化金额,默认元
|
|
3
3
|
*/
|
|
4
4
|
export function formatAmount(s) {
|
|
5
|
+
var _s;
|
|
5
6
|
var radix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
6
|
-
var money = parseFloat(s.toString());
|
|
7
|
+
var money = parseFloat((_s = s) === null || _s === void 0 ? void 0 : _s.toString());
|
|
7
8
|
if (money) {
|
|
8
9
|
// eslint-disable-next-line no-param-reassign
|
|
9
10
|
s = "".concat((money / radix).toFixed(2));
|
package/lib/formatAmount.js
CHANGED
|
@@ -8,8 +8,9 @@ exports.formatAmount = formatAmount;
|
|
|
8
8
|
* 格式化金额,默认元
|
|
9
9
|
*/
|
|
10
10
|
function formatAmount(s) {
|
|
11
|
+
var _s;
|
|
11
12
|
var radix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
12
|
-
var money = parseFloat(s.toString());
|
|
13
|
+
var money = parseFloat((_s = s) === null || _s === void 0 ? void 0 : _s.toString());
|
|
13
14
|
if (money) {
|
|
14
15
|
// eslint-disable-next-line no-param-reassign
|
|
15
16
|
s = "".concat((money / radix).toFixed(2));
|