@daysnap/utils 0.0.33 → 0.0.34

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 CHANGED
@@ -82,7 +82,7 @@ base64 转 blob
82
82
 
83
83
  #### Defined in
84
84
 
85
- [base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/2be359b/src/base64ToBlob.ts#L6)
85
+ [base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/55f426c/src/base64ToBlob.ts#L6)
86
86
 
87
87
  ___
88
88
 
@@ -104,7 +104,7 @@ blob 转 base64
104
104
 
105
105
  #### Defined in
106
106
 
107
- [blobToBase64.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/blobToBase64.ts#L4)
107
+ [blobToBase64.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/blobToBase64.ts#L4)
108
108
 
109
109
  ___
110
110
 
@@ -132,7 +132,7 @@ ___
132
132
 
133
133
  #### Defined in
134
134
 
135
- clone.ts:7
135
+ [clone.ts:7](https://github.com/daysnap/utils/blob/55f426c/src/clone.ts#L7)
136
136
 
137
137
  ___
138
138
 
@@ -154,7 +154,7 @@ ___
154
154
 
155
155
  #### Defined in
156
156
 
157
- [createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/createHexColorByHash.ts#L4)
157
+ [createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/createHexColorByHash.ts#L4)
158
158
 
159
159
  ___
160
160
 
@@ -180,7 +180,7 @@ ___
180
180
 
181
181
  #### Defined in
182
182
 
183
- [compareVersion.ts:9](https://github.com/daysnap/utils/blob/2be359b/src/compareVersion.ts#L9)
183
+ [compareVersion.ts:9](https://github.com/daysnap/utils/blob/55f426c/src/compareVersion.ts#L9)
184
184
 
185
185
  ___
186
186
 
@@ -202,7 +202,7 @@ ___
202
202
 
203
203
  #### Defined in
204
204
 
205
- [compressImage.ts:6](https://github.com/daysnap/utils/blob/2be359b/src/compressImage.ts#L6)
205
+ [compressImage.ts:6](https://github.com/daysnap/utils/blob/55f426c/src/compressImage.ts#L6)
206
206
 
207
207
  ___
208
208
 
@@ -226,7 +226,7 @@ ___
226
226
 
227
227
  #### Defined in
228
228
 
229
- [downloadFile.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/downloadFile.ts#L4)
229
+ [downloadFile.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/downloadFile.ts#L4)
230
230
 
231
231
  ___
232
232
 
@@ -255,7 +255,7 @@ ___
255
255
 
256
256
  #### Defined in
257
257
 
258
- [each.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/each.ts#L4)
258
+ [each.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/each.ts#L4)
259
259
 
260
260
  ▸ **each**<`T`\>(`data`, `callback`): `void`
261
261
 
@@ -278,7 +278,7 @@ ___
278
278
 
279
279
  #### Defined in
280
280
 
281
- [each.ts:8](https://github.com/daysnap/utils/blob/2be359b/src/each.ts#L8)
281
+ [each.ts:8](https://github.com/daysnap/utils/blob/55f426c/src/each.ts#L8)
282
282
 
283
283
  ___
284
284
 
@@ -300,7 +300,7 @@ ___
300
300
 
301
301
  #### Defined in
302
302
 
303
- [filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/filterBankCardNo.ts#L4)
303
+ [filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/filterBankCardNo.ts#L4)
304
304
 
305
305
  ___
306
306
 
@@ -322,7 +322,7 @@ ___
322
322
 
323
323
  #### Defined in
324
324
 
325
- [filterEmoji.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/filterEmoji.ts#L4)
325
+ [filterEmoji.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/filterEmoji.ts#L4)
326
326
 
327
327
  ___
328
328
 
@@ -344,7 +344,7 @@ ___
344
344
 
345
345
  #### Defined in
346
346
 
347
- [filterIdCard.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/filterIdCard.ts#L4)
347
+ [filterIdCard.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/filterIdCard.ts#L4)
348
348
 
349
349
  ___
350
350
 
@@ -366,7 +366,7 @@ ___
366
366
 
367
367
  #### Defined in
368
368
 
369
- [filterName.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/filterName.ts#L4)
369
+ [filterName.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/filterName.ts#L4)
370
370
 
371
371
  ___
372
372
 
@@ -391,7 +391,7 @@ filterPhone('13177778888', ' ') => 131 **** 8888
391
391
 
392
392
  #### Defined in
393
393
 
394
- [filterPhone.ts:6](https://github.com/daysnap/utils/blob/2be359b/src/filterPhone.ts#L6)
394
+ [filterPhone.ts:6](https://github.com/daysnap/utils/blob/55f426c/src/filterPhone.ts#L6)
395
395
 
396
396
  ___
397
397
 
@@ -414,7 +414,7 @@ ___
414
414
 
415
415
  #### Defined in
416
416
 
417
- [formatAmount.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/formatAmount.ts#L4)
417
+ [formatAmount.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/formatAmount.ts#L4)
418
418
 
419
419
  ___
420
420
 
@@ -437,7 +437,7 @@ ___
437
437
 
438
438
  #### Defined in
439
439
 
440
- [formatDate.ts:6](https://github.com/daysnap/utils/blob/2be359b/src/formatDate.ts#L6)
440
+ [formatDate.ts:6](https://github.com/daysnap/utils/blob/55f426c/src/formatDate.ts#L6)
441
441
 
442
442
  ___
443
443
 
@@ -459,7 +459,7 @@ ___
459
459
 
460
460
  #### Defined in
461
461
 
462
- [getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/getBlobByUrl.ts#L4)
462
+ [getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/getBlobByUrl.ts#L4)
463
463
 
464
464
  ___
465
465
 
@@ -482,7 +482,7 @@ ___
482
482
 
483
483
  #### Defined in
484
484
 
485
- [storage/index.ts:7](https://github.com/daysnap/utils/blob/2be359b/src/storage/index.ts#L7)
485
+ [storage/index.ts:7](https://github.com/daysnap/utils/blob/55f426c/src/storage/index.ts#L7)
486
486
 
487
487
  ___
488
488
 
@@ -504,7 +504,7 @@ ___
504
504
 
505
505
  #### Defined in
506
506
 
507
- [getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/getDayMillisecond.ts#L4)
507
+ [getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/getDayMillisecond.ts#L4)
508
508
 
509
509
  ___
510
510
 
@@ -526,7 +526,7 @@ ___
526
526
 
527
527
  #### Defined in
528
528
 
529
- [getImageInfo.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/getImageInfo.ts#L4)
529
+ [getImageInfo.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/getImageInfo.ts#L4)
530
530
 
531
531
  ___
532
532
 
@@ -549,7 +549,7 @@ ___
549
549
 
550
550
  #### Defined in
551
551
 
552
- [storage/index.ts:7](https://github.com/daysnap/utils/blob/2be359b/src/storage/index.ts#L7)
552
+ [storage/index.ts:7](https://github.com/daysnap/utils/blob/55f426c/src/storage/index.ts#L7)
553
553
 
554
554
  ___
555
555
 
@@ -571,7 +571,7 @@ ___
571
571
 
572
572
  #### Defined in
573
573
 
574
- [getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/getVideoInfo.ts#L4)
574
+ [getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/getVideoInfo.ts#L4)
575
575
 
576
576
  ___
577
577
 
@@ -587,7 +587,7 @@ ___
587
587
 
588
588
  #### Defined in
589
589
 
590
- [inBrowser.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/inBrowser.ts#L4)
590
+ [inBrowser.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/inBrowser.ts#L4)
591
591
 
592
592
  ___
593
593
 
@@ -603,7 +603,7 @@ ___
603
603
 
604
604
  #### Defined in
605
605
 
606
- [isAndroid.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isAndroid.ts#L4)
606
+ [isAndroid.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isAndroid.ts#L4)
607
607
 
608
608
  ___
609
609
 
@@ -625,7 +625,7 @@ ___
625
625
 
626
626
  #### Defined in
627
627
 
628
- [isEmail.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isEmail.ts#L4)
628
+ [isEmail.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isEmail.ts#L4)
629
629
 
630
630
  ___
631
631
 
@@ -647,7 +647,7 @@ ___
647
647
 
648
648
  #### Defined in
649
649
 
650
- [isEmpty.ts:6](https://github.com/daysnap/utils/blob/2be359b/src/isEmpty.ts#L6)
650
+ [isEmpty.ts:6](https://github.com/daysnap/utils/blob/55f426c/src/isEmpty.ts#L6)
651
651
 
652
652
  ___
653
653
 
@@ -669,7 +669,7 @@ ___
669
669
 
670
670
  #### Defined in
671
671
 
672
- [isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/2be359b/src/isEmptyObject.ts#L5)
672
+ [isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/55f426c/src/isEmptyObject.ts#L5)
673
673
 
674
674
  ___
675
675
 
@@ -691,7 +691,7 @@ val is Error
691
691
 
692
692
  #### Defined in
693
693
 
694
- [isError.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isError.ts#L4)
694
+ [isError.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isError.ts#L4)
695
695
 
696
696
  ___
697
697
 
@@ -713,7 +713,7 @@ val is Function
713
713
 
714
714
  #### Defined in
715
715
 
716
- [isFunction.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isFunction.ts#L4)
716
+ [isFunction.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isFunction.ts#L4)
717
717
 
718
718
  ___
719
719
 
@@ -729,7 +729,7 @@ ___
729
729
 
730
730
  #### Defined in
731
731
 
732
- [isIOS.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isIOS.ts#L4)
732
+ [isIOS.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isIOS.ts#L4)
733
733
 
734
734
  ___
735
735
 
@@ -751,7 +751,7 @@ ___
751
751
 
752
752
  #### Defined in
753
753
 
754
- [isIdCard.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isIdCard.ts#L4)
754
+ [isIdCard.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isIdCard.ts#L4)
755
755
 
756
756
  ___
757
757
 
@@ -773,7 +773,7 @@ ___
773
773
 
774
774
  #### Defined in
775
775
 
776
- [isJSONString.ts:7](https://github.com/daysnap/utils/blob/2be359b/src/isJSONString.ts#L7)
776
+ [isJSONString.ts:7](https://github.com/daysnap/utils/blob/55f426c/src/isJSONString.ts#L7)
777
777
 
778
778
  ___
779
779
 
@@ -795,7 +795,7 @@ ___
795
795
 
796
796
  #### Defined in
797
797
 
798
- isLan.ts:5
798
+ [isLan.ts:5](https://github.com/daysnap/utils/blob/55f426c/src/isLan.ts#L5)
799
799
 
800
800
  ___
801
801
 
@@ -817,7 +817,7 @@ ___
817
817
 
818
818
  #### Defined in
819
819
 
820
- [isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/2be359b/src/isLicenseCode.ts#L5)
820
+ [isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/55f426c/src/isLicenseCode.ts#L5)
821
821
 
822
822
  ___
823
823
 
@@ -833,7 +833,7 @@ ___
833
833
 
834
834
  #### Defined in
835
835
 
836
- [isMobile.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isMobile.ts#L4)
836
+ [isMobile.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isMobile.ts#L4)
837
837
 
838
838
  ___
839
839
 
@@ -855,7 +855,7 @@ val is null
855
855
 
856
856
  #### Defined in
857
857
 
858
- [isNull.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isNull.ts#L4)
858
+ [isNull.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isNull.ts#L4)
859
859
 
860
860
  ___
861
861
 
@@ -877,7 +877,7 @@ val is number
877
877
 
878
878
  #### Defined in
879
879
 
880
- isNumber.ts:5
880
+ [isNumber.ts:5](https://github.com/daysnap/utils/blob/55f426c/src/isNumber.ts#L5)
881
881
 
882
882
  ___
883
883
 
@@ -899,7 +899,7 @@ val is Record<string, any\>
899
899
 
900
900
  #### Defined in
901
901
 
902
- [isObject.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isObject.ts#L4)
902
+ [isObject.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isObject.ts#L4)
903
903
 
904
904
  ___
905
905
 
@@ -921,7 +921,7 @@ ___
921
921
 
922
922
  #### Defined in
923
923
 
924
- [isPhone.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isPhone.ts#L4)
924
+ [isPhone.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isPhone.ts#L4)
925
925
 
926
926
  ___
927
927
 
@@ -949,7 +949,7 @@ val is Promise<T\>
949
949
 
950
950
  #### Defined in
951
951
 
952
- [isPromise.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isPromise.ts#L4)
952
+ [isPromise.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isPromise.ts#L4)
953
953
 
954
954
  ___
955
955
 
@@ -971,7 +971,7 @@ val is RegExp
971
971
 
972
972
  #### Defined in
973
973
 
974
- [isRegExp.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isRegExp.ts#L4)
974
+ [isRegExp.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isRegExp.ts#L4)
975
975
 
976
976
  ___
977
977
 
@@ -993,7 +993,7 @@ val is string
993
993
 
994
994
  #### Defined in
995
995
 
996
- [isString.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isString.ts#L4)
996
+ [isString.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isString.ts#L4)
997
997
 
998
998
  ___
999
999
 
@@ -1015,7 +1015,7 @@ val is undefined
1015
1015
 
1016
1016
  #### Defined in
1017
1017
 
1018
- [isUndefined.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/isUndefined.ts#L4)
1018
+ [isUndefined.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/isUndefined.ts#L4)
1019
1019
 
1020
1020
  ___
1021
1021
 
@@ -1037,7 +1037,7 @@ val is Window
1037
1037
 
1038
1038
  #### Defined in
1039
1039
 
1040
- [isWindow.ts:5](https://github.com/daysnap/utils/blob/2be359b/src/isWindow.ts#L5)
1040
+ [isWindow.ts:5](https://github.com/daysnap/utils/blob/55f426c/src/isWindow.ts#L5)
1041
1041
 
1042
1042
  ___
1043
1043
 
@@ -1067,7 +1067,7 @@ ___
1067
1067
 
1068
1068
  #### Defined in
1069
1069
 
1070
- [omit.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/omit.ts#L4)
1070
+ [omit.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/omit.ts#L4)
1071
1071
 
1072
1072
  ___
1073
1073
 
@@ -1089,7 +1089,7 @@ ___
1089
1089
 
1090
1090
  #### Defined in
1091
1091
 
1092
- [parseDate.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/parseDate.ts#L4)
1092
+ [parseDate.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/parseDate.ts#L4)
1093
1093
 
1094
1094
  ___
1095
1095
 
@@ -1112,16 +1112,22 @@ ___
1112
1112
 
1113
1113
  #### Defined in
1114
1114
 
1115
- [parseError.ts:8](https://github.com/daysnap/utils/blob/2be359b/src/parseError.ts#L8)
1115
+ [parseError.ts:8](https://github.com/daysnap/utils/blob/55f426c/src/parseError.ts#L8)
1116
1116
 
1117
1117
  ___
1118
1118
 
1119
1119
  ### parsePath
1120
1120
 
1121
- ▸ **parsePath**(`obj`, `path`): `Record`<`string`, `any`\>
1121
+ ▸ **parsePath**<`T`\>(`obj`, `path`): `T`
1122
1122
 
1123
1123
  根据路径解析值
1124
1124
 
1125
+ #### Type parameters
1126
+
1127
+ | Name | Type |
1128
+ | :------ | :------ |
1129
+ | `T` | `any` |
1130
+
1125
1131
  #### Parameters
1126
1132
 
1127
1133
  | Name | Type |
@@ -1131,11 +1137,11 @@ ___
1131
1137
 
1132
1138
  #### Returns
1133
1139
 
1134
- `Record`<`string`, `any`\>
1140
+ `T`
1135
1141
 
1136
1142
  #### Defined in
1137
1143
 
1138
- [parsePath.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/parsePath.ts#L4)
1144
+ [parsePath.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/parsePath.ts#L4)
1139
1145
 
1140
1146
  ___
1141
1147
 
@@ -1158,7 +1164,7 @@ ___
1158
1164
 
1159
1165
  #### Defined in
1160
1166
 
1161
- [parseQuery.ts:8](https://github.com/daysnap/utils/blob/2be359b/src/parseQuery.ts#L8)
1167
+ [parseQuery.ts:8](https://github.com/daysnap/utils/blob/55f426c/src/parseQuery.ts#L8)
1162
1168
 
1163
1169
  ___
1164
1170
 
@@ -1188,7 +1194,7 @@ ___
1188
1194
 
1189
1195
  #### Defined in
1190
1196
 
1191
- [pick.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/pick.ts#L4)
1197
+ [pick.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/pick.ts#L4)
1192
1198
 
1193
1199
  ___
1194
1200
 
@@ -1211,7 +1217,7 @@ ___
1211
1217
 
1212
1218
  #### Defined in
1213
1219
 
1214
- [replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/replaceCrlf.ts#L4)
1220
+ [replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/replaceCrlf.ts#L4)
1215
1221
 
1216
1222
  ___
1217
1223
 
@@ -1237,7 +1243,7 @@ reserve(0, '--') => 0
1237
1243
 
1238
1244
  #### Defined in
1239
1245
 
1240
- [reserve.ts:8](https://github.com/daysnap/utils/blob/2be359b/src/reserve.ts#L8)
1246
+ [reserve.ts:8](https://github.com/daysnap/utils/blob/55f426c/src/reserve.ts#L8)
1241
1247
 
1242
1248
  ___
1243
1249
 
@@ -1260,7 +1266,7 @@ ___
1260
1266
 
1261
1267
  #### Defined in
1262
1268
 
1263
- round.ts:6
1269
+ [round.ts:6](https://github.com/daysnap/utils/blob/55f426c/src/round.ts#L6)
1264
1270
 
1265
1271
  ___
1266
1272
 
@@ -1283,7 +1289,7 @@ ___
1283
1289
 
1284
1290
  #### Defined in
1285
1291
 
1286
- [sleep.ts:4](https://github.com/daysnap/utils/blob/2be359b/src/sleep.ts#L4)
1292
+ [sleep.ts:4](https://github.com/daysnap/utils/blob/55f426c/src/sleep.ts#L4)
1287
1293
 
1288
1294
  ___
1289
1295
 
@@ -1305,4 +1311,4 @@ ___
1305
1311
 
1306
1312
  #### Defined in
1307
1313
 
1308
- [stringifyQuery.ts:6](https://github.com/daysnap/utils/blob/2be359b/src/stringifyQuery.ts#L6)
1314
+ [stringifyQuery.ts:6](https://github.com/daysnap/utils/blob/55f426c/src/stringifyQuery.ts#L6)
package/es/parsePath.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * 根据路径解析值
3
3
  */
4
- export declare function parsePath(obj: Record<string, any>, path: string): Record<string, any>;
4
+ export declare function parsePath<T = any>(obj: Record<string, any>, path: string): T;
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * 根据路径解析值
3
3
  */
4
- export declare function parsePath(obj: Record<string, any>, path: string): Record<string, any>;
4
+ export declare function parsePath<T = any>(obj: Record<string, any>, path: string): T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daysnap/utils",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "description": "通用的工具库",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",