@daysnap/utils 0.0.58 → 0.0.59

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
@@ -8,6 +8,7 @@
8
8
 
9
9
  - [base64ToBlob](modules.md#base64toblob)
10
10
  - [blobToBase64](modules.md#blobtobase64)
11
+ - [cached](modules.md#cached)
11
12
  - [camelCase](modules.md#camelcase)
12
13
  - [canvasToBlob](modules.md#canvastoblob)
13
14
  - [capitalize](modules.md#capitalize)
@@ -19,6 +20,7 @@
19
20
  - [debounce](modules.md#debounce)
20
21
  - [downloadFile](modules.md#downloadfile)
21
22
  - [each](modules.md#each)
23
+ - [exitFullscreen](modules.md#exitfullscreen)
22
24
  - [filterBankCardNo](modules.md#filterbankcardno)
23
25
  - [filterCRLF](modules.md#filtercrlf)
24
26
  - [filterEmoji](modules.md#filteremoji)
@@ -61,6 +63,7 @@
61
63
  - [isLan](modules.md#islan)
62
64
  - [isLicenseCode](modules.md#islicensecode)
63
65
  - [isMobile](modules.md#ismobile)
66
+ - [isNativeFunction](modules.md#isnativefunction)
64
67
  - [isNull](modules.md#isnull)
65
68
  - [isNumber](modules.md#isnumber)
66
69
  - [isObject](modules.md#isobject)
@@ -75,6 +78,7 @@
75
78
  - [isWeixin](modules.md#isweixin)
76
79
  - [isWindow](modules.md#iswindow)
77
80
  - [kebabCase](modules.md#kebabcase)
81
+ - [listGenerator](modules.md#listgenerator)
78
82
  - [mousewheel](modules.md#mousewheel)
79
83
  - [normalizePath](modules.md#normalizepath)
80
84
  - [omit](modules.md#omit)
@@ -87,6 +91,7 @@
87
91
  - [pascalCase](modules.md#pascalcase)
88
92
  - [pick](modules.md#pick)
89
93
  - [replaceCrlf](modules.md#replacecrlf)
94
+ - [requestFullScreen](modules.md#requestfullscreen)
90
95
  - [reserve](modules.md#reserve)
91
96
  - [rgbToHex](modules.md#rgbtohex)
92
97
  - [round](modules.md#round)
@@ -121,7 +126,7 @@ base64 转 blob
121
126
 
122
127
  #### Defined in
123
128
 
124
- [base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/468ef5c/src/base64ToBlob.ts#L6)
129
+ [base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/71e90a2/src/base64ToBlob.ts#L6)
125
130
 
126
131
  ___
127
132
 
@@ -143,7 +148,48 @@ blob 转 base64
143
148
 
144
149
  #### Defined in
145
150
 
146
- [blobToBase64.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/blobToBase64.ts#L4)
151
+ [blobToBase64.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/blobToBase64.ts#L4)
152
+
153
+ ___
154
+
155
+ ### cached
156
+
157
+ ▸ **cached**<`T`\>(`fn`): (...`args`: `Parameters`<`T`\>) => `ReturnType`<`T`\>
158
+
159
+ 缓存、记忆函数,缓存函数的运算结果
160
+ 需注意缓存的函数得是纯函数
161
+
162
+ #### Type parameters
163
+
164
+ | Name | Type |
165
+ | :------ | :------ |
166
+ | `T` | extends (...`args`: `any`[]) => `any` |
167
+
168
+ #### Parameters
169
+
170
+ | Name | Type |
171
+ | :------ | :------ |
172
+ | `fn` | `T` |
173
+
174
+ #### Returns
175
+
176
+ `fn`
177
+
178
+ ▸ (`...args`): `ReturnType`<`T`\>
179
+
180
+ ##### Parameters
181
+
182
+ | Name | Type |
183
+ | :------ | :------ |
184
+ | `...args` | `Parameters`<`T`\> |
185
+
186
+ ##### Returns
187
+
188
+ `ReturnType`<`T`\>
189
+
190
+ #### Defined in
191
+
192
+ [cached.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/cached.ts#L5)
147
193
 
148
194
  ___
149
195
 
@@ -166,7 +212,7 @@ camelCase('hello-world') => helloWorld
166
212
 
167
213
  #### Defined in
168
214
 
169
- [camelCase.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/camelCase.ts#L5)
215
+ [camelCase.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/camelCase.ts#L5)
170
216
 
171
217
  ___
172
218
 
@@ -190,7 +236,7 @@ canvas 转 blob 文件
190
236
 
191
237
  #### Defined in
192
238
 
193
- [canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/canvasToBlob.ts#L4)
239
+ [canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/canvasToBlob.ts#L4)
194
240
 
195
241
  ___
196
242
 
@@ -213,7 +259,7 @@ capitalize('hello world') => Hello world
213
259
 
214
260
  #### Defined in
215
261
 
216
- [capitalize.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/capitalize.ts#L5)
262
+ [capitalize.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/capitalize.ts#L5)
217
263
 
218
264
  ___
219
265
 
@@ -241,7 +287,7 @@ ___
241
287
 
242
288
  #### Defined in
243
289
 
244
- [clone.ts:8](https://github.com/daysnap/utils/blob/468ef5c/src/clone.ts#L8)
290
+ [clone.ts:8](https://github.com/daysnap/utils/blob/71e90a2/src/clone.ts#L8)
245
291
 
246
292
  ___
247
293
 
@@ -269,7 +315,7 @@ ___
269
315
 
270
316
  #### Defined in
271
317
 
272
- [cloneSimple.ts:7](https://github.com/daysnap/utils/blob/468ef5c/src/cloneSimple.ts#L7)
318
+ [cloneSimple.ts:7](https://github.com/daysnap/utils/blob/71e90a2/src/cloneSimple.ts#L7)
273
319
 
274
320
  ___
275
321
 
@@ -291,7 +337,7 @@ ___
291
337
 
292
338
  #### Defined in
293
339
 
294
- [createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/createHexColorByHash.ts#L4)
340
+ [createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/createHexColorByHash.ts#L4)
295
341
 
296
342
  ___
297
343
 
@@ -317,7 +363,7 @@ ___
317
363
 
318
364
  #### Defined in
319
365
 
320
- [compareVersion.ts:9](https://github.com/daysnap/utils/blob/468ef5c/src/compareVersion.ts#L9)
366
+ [compareVersion.ts:9](https://github.com/daysnap/utils/blob/71e90a2/src/compareVersion.ts#L9)
321
367
 
322
368
  ___
323
369
 
@@ -339,7 +385,7 @@ ___
339
385
 
340
386
  #### Defined in
341
387
 
342
- [compressImage.ts:6](https://github.com/daysnap/utils/blob/468ef5c/src/compressImage.ts#L6)
388
+ [compressImage.ts:6](https://github.com/daysnap/utils/blob/71e90a2/src/compressImage.ts#L6)
343
389
 
344
390
  ___
345
391
 
@@ -382,7 +428,7 @@ ___
382
428
 
383
429
  #### Defined in
384
430
 
385
- [debounce.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/debounce.ts#L5)
431
+ [debounce.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/debounce.ts#L5)
386
432
 
387
433
  ___
388
434
 
@@ -406,7 +452,7 @@ ___
406
452
 
407
453
  #### Defined in
408
454
 
409
- [downloadFile.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/downloadFile.ts#L4)
455
+ [downloadFile.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/downloadFile.ts#L4)
410
456
 
411
457
  ___
412
458
 
@@ -435,7 +481,7 @@ ___
435
481
 
436
482
  #### Defined in
437
483
 
438
- [each.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/each.ts#L4)
484
+ [each.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/each.ts#L4)
439
485
 
440
486
  ▸ **each**<`T`\>(`data`, `callback`): `void`
441
487
 
@@ -458,7 +504,25 @@ ___
458
504
 
459
505
  #### Defined in
460
506
 
461
- [each.ts:8](https://github.com/daysnap/utils/blob/468ef5c/src/each.ts#L8)
507
+ [each.ts:8](https://github.com/daysnap/utils/blob/71e90a2/src/each.ts#L8)
508
+
509
+ ___
510
+
511
+ ### exitFullscreen
512
+
513
+ ▸ **exitFullscreen**(): `Promise`<`any`\>
514
+
515
+ 退出全屏
516
+ 成功则 resolve , 如果不支持退出全屏或退出失败则 rejected
517
+ [MDN Reference](https://developer.mozilla.org/zh-CN/docs/Web/API/Document/exitFullscreen)
518
+
519
+ #### Returns
520
+
521
+ `Promise`<`any`\>
522
+
523
+ #### Defined in
524
+
525
+ [exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/71e90a2/src/exitFullscreen.ts#L6)
462
526
 
463
527
  ___
464
528
 
@@ -480,7 +544,7 @@ ___
480
544
 
481
545
  #### Defined in
482
546
 
483
- [filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/filterBankCardNo.ts#L4)
547
+ [filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/filterBankCardNo.ts#L4)
484
548
 
485
549
  ___
486
550
 
@@ -502,7 +566,7 @@ ___
502
566
 
503
567
  #### Defined in
504
568
 
505
- [filterCRLF.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/filterCRLF.ts#L4)
569
+ [filterCRLF.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/filterCRLF.ts#L4)
506
570
 
507
571
  ___
508
572
 
@@ -524,7 +588,7 @@ ___
524
588
 
525
589
  #### Defined in
526
590
 
527
- [filterEmoji.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/filterEmoji.ts#L4)
591
+ [filterEmoji.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/filterEmoji.ts#L4)
528
592
 
529
593
  ___
530
594
 
@@ -547,7 +611,7 @@ ___
547
611
 
548
612
  #### Defined in
549
613
 
550
- [filterIdCard.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/filterIdCard.ts#L5)
614
+ [filterIdCard.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/filterIdCard.ts#L5)
551
615
 
552
616
  ___
553
617
 
@@ -569,7 +633,7 @@ ___
569
633
 
570
634
  #### Defined in
571
635
 
572
- [filterName.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/filterName.ts#L4)
636
+ [filterName.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/filterName.ts#L4)
573
637
 
574
638
  ___
575
639
 
@@ -594,7 +658,7 @@ filterPhone('13177778888', ' ') => 131 **** 8888
594
658
 
595
659
  #### Defined in
596
660
 
597
- [filterPhone.ts:6](https://github.com/daysnap/utils/blob/468ef5c/src/filterPhone.ts#L6)
661
+ [filterPhone.ts:6](https://github.com/daysnap/utils/blob/71e90a2/src/filterPhone.ts#L6)
598
662
 
599
663
  ___
600
664
 
@@ -617,7 +681,7 @@ ___
617
681
 
618
682
  #### Defined in
619
683
 
620
- [formatAmount.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/formatAmount.ts#L4)
684
+ [formatAmount.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/formatAmount.ts#L4)
621
685
 
622
686
  ___
623
687
 
@@ -641,7 +705,7 @@ ___
641
705
 
642
706
  #### Defined in
643
707
 
644
- [formatDate.ts:8](https://github.com/daysnap/utils/blob/468ef5c/src/formatDate.ts#L8)
708
+ [formatDate.ts:8](https://github.com/daysnap/utils/blob/71e90a2/src/formatDate.ts#L8)
645
709
 
646
710
  ___
647
711
 
@@ -664,7 +728,7 @@ fix iOS 日期时间格式如果是 - 就会报错的问题
664
728
 
665
729
  #### Defined in
666
730
 
667
- [formatDateStr.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/formatDateStr.ts#L5)
731
+ [formatDateStr.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/formatDateStr.ts#L5)
668
732
 
669
733
  ___
670
734
 
@@ -689,7 +753,7 @@ formatMessage({ a: '123', b: { ba: '456' } }, ['b.ba']) => '456'
689
753
 
690
754
  #### Defined in
691
755
 
692
- [formatMessage.ts:11](https://github.com/daysnap/utils/blob/468ef5c/src/formatMessage.ts#L11)
756
+ [formatMessage.ts:11](https://github.com/daysnap/utils/blob/71e90a2/src/formatMessage.ts#L11)
693
757
 
694
758
  ___
695
759
 
@@ -721,7 +785,7 @@ rest = { xxx: 1 }
721
785
 
722
786
  #### Defined in
723
787
 
724
- [formatPathParams.ts:8](https://github.com/daysnap/utils/blob/468ef5c/src/formatPathParams.ts#L8)
788
+ [formatPathParams.ts:8](https://github.com/daysnap/utils/blob/71e90a2/src/formatPathParams.ts#L8)
725
789
 
726
790
  ___
727
791
 
@@ -743,7 +807,7 @@ ___
743
807
 
744
808
  #### Defined in
745
809
 
746
- [getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/getBlobByUrl.ts#L4)
810
+ [getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/getBlobByUrl.ts#L4)
747
811
 
748
812
  ___
749
813
 
@@ -766,7 +830,7 @@ ___
766
830
 
767
831
  #### Defined in
768
832
 
769
- [storage/index.ts:7](https://github.com/daysnap/utils/blob/468ef5c/src/storage/index.ts#L7)
833
+ [storage/index.ts:7](https://github.com/daysnap/utils/blob/71e90a2/src/storage/index.ts#L7)
770
834
 
771
835
  ___
772
836
 
@@ -788,7 +852,7 @@ ___
788
852
 
789
853
  #### Defined in
790
854
 
791
- [getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/getDayMillisecond.ts#L4)
855
+ [getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/getDayMillisecond.ts#L4)
792
856
 
793
857
  ___
794
858
 
@@ -810,7 +874,7 @@ ___
810
874
 
811
875
  #### Defined in
812
876
 
813
- [getImageInfo.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/getImageInfo.ts#L4)
877
+ [getImageInfo.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/getImageInfo.ts#L4)
814
878
 
815
879
  ___
816
880
 
@@ -833,7 +897,7 @@ ___
833
897
 
834
898
  #### Defined in
835
899
 
836
- [storage/index.ts:7](https://github.com/daysnap/utils/blob/468ef5c/src/storage/index.ts#L7)
900
+ [storage/index.ts:7](https://github.com/daysnap/utils/blob/71e90a2/src/storage/index.ts#L7)
837
901
 
838
902
  ___
839
903
 
@@ -856,7 +920,7 @@ ___
856
920
 
857
921
  #### Defined in
858
922
 
859
- [getRandom.ts:6](https://github.com/daysnap/utils/blob/468ef5c/src/getRandom.ts#L6)
923
+ [getRandom.ts:7](https://github.com/daysnap/utils/blob/71e90a2/src/getRandom.ts#L7)
860
924
 
861
925
  ___
862
926
 
@@ -872,7 +936,7 @@ ___
872
936
 
873
937
  #### Defined in
874
938
 
875
- [getRandomColor.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/getRandomColor.ts#L4)
939
+ [getRandomColor.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/getRandomColor.ts#L4)
876
940
 
877
941
  ___
878
942
 
@@ -894,7 +958,7 @@ ___
894
958
 
895
959
  #### Defined in
896
960
 
897
- [getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/468ef5c/src/getRandomNumber.ts#L7)
961
+ [getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/71e90a2/src/getRandomNumber.ts#L7)
898
962
 
899
963
  ___
900
964
 
@@ -916,7 +980,7 @@ ___
916
980
 
917
981
  #### Defined in
918
982
 
919
- [getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/getVideoInfo.ts#L4)
983
+ [getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/getVideoInfo.ts#L4)
920
984
 
921
985
  ___
922
986
 
@@ -932,7 +996,7 @@ ___
932
996
 
933
997
  #### Defined in
934
998
 
935
- [inBrowser.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/inBrowser.ts#L4)
999
+ [inBrowser.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/inBrowser.ts#L4)
936
1000
 
937
1001
  ___
938
1002
 
@@ -954,7 +1018,7 @@ ___
954
1018
 
955
1019
  #### Defined in
956
1020
 
957
- [insertLink.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/insertLink.ts#L4)
1021
+ [insertLink.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/insertLink.ts#L4)
958
1022
 
959
1023
  ▸ **insertLink**(`href`, `callback`): `void`
960
1024
 
@@ -971,7 +1035,7 @@ ___
971
1035
 
972
1036
  #### Defined in
973
1037
 
974
- [insertLink.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/insertLink.ts#L5)
1038
+ [insertLink.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/insertLink.ts#L5)
975
1039
 
976
1040
  ___
977
1041
 
@@ -993,7 +1057,7 @@ ___
993
1057
 
994
1058
  #### Defined in
995
1059
 
996
- [insertScript.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/insertScript.ts#L4)
1060
+ [insertScript.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/insertScript.ts#L4)
997
1061
 
998
1062
  ▸ **insertScript**(`src`, `callback`): `void`
999
1063
 
@@ -1010,7 +1074,7 @@ ___
1010
1074
 
1011
1075
  #### Defined in
1012
1076
 
1013
- [insertScript.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/insertScript.ts#L5)
1077
+ [insertScript.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/insertScript.ts#L5)
1014
1078
 
1015
1079
  ___
1016
1080
 
@@ -1032,7 +1096,7 @@ ___
1032
1096
 
1033
1097
  #### Defined in
1034
1098
 
1035
- [insertStyle.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/insertStyle.ts#L4)
1099
+ [insertStyle.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/insertStyle.ts#L4)
1036
1100
 
1037
1101
  ___
1038
1102
 
@@ -1061,7 +1125,7 @@ isAmount('1.123') => false
1061
1125
 
1062
1126
  #### Defined in
1063
1127
 
1064
- [isAmount.ts:11](https://github.com/daysnap/utils/blob/468ef5c/src/isAmount.ts#L11)
1128
+ [isAmount.ts:11](https://github.com/daysnap/utils/blob/71e90a2/src/isAmount.ts#L11)
1065
1129
 
1066
1130
  ___
1067
1131
 
@@ -1077,7 +1141,7 @@ ___
1077
1141
 
1078
1142
  #### Defined in
1079
1143
 
1080
- [isAndroid.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isAndroid.ts#L4)
1144
+ [isAndroid.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isAndroid.ts#L4)
1081
1145
 
1082
1146
  ___
1083
1147
 
@@ -1101,7 +1165,7 @@ val is any[]
1101
1165
 
1102
1166
  #### Defined in
1103
1167
 
1104
- [isArray.ts:6](https://github.com/daysnap/utils/blob/468ef5c/src/isArray.ts#L6)
1168
+ [isArray.ts:6](https://github.com/daysnap/utils/blob/71e90a2/src/isArray.ts#L6)
1105
1169
 
1106
1170
  ___
1107
1171
 
@@ -1123,7 +1187,7 @@ val is boolean
1123
1187
 
1124
1188
  #### Defined in
1125
1189
 
1126
- [isBoolean.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/isBoolean.ts#L5)
1190
+ [isBoolean.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/isBoolean.ts#L5)
1127
1191
 
1128
1192
  ___
1129
1193
 
@@ -1145,7 +1209,7 @@ ___
1145
1209
 
1146
1210
  #### Defined in
1147
1211
 
1148
- [isChinese.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isChinese.ts#L4)
1212
+ [isChinese.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isChinese.ts#L4)
1149
1213
 
1150
1214
  ___
1151
1215
 
@@ -1167,7 +1231,7 @@ val is Date
1167
1231
 
1168
1232
  #### Defined in
1169
1233
 
1170
- [isDate.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isDate.ts#L4)
1234
+ [isDate.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isDate.ts#L4)
1171
1235
 
1172
1236
  ___
1173
1237
 
@@ -1189,7 +1253,7 @@ ___
1189
1253
 
1190
1254
  #### Defined in
1191
1255
 
1192
- [isEmail.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isEmail.ts#L4)
1256
+ [isEmail.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isEmail.ts#L4)
1193
1257
 
1194
1258
  ___
1195
1259
 
@@ -1211,7 +1275,7 @@ ___
1211
1275
 
1212
1276
  #### Defined in
1213
1277
 
1214
- [isEmpty.ts:6](https://github.com/daysnap/utils/blob/468ef5c/src/isEmpty.ts#L6)
1278
+ [isEmpty.ts:6](https://github.com/daysnap/utils/blob/71e90a2/src/isEmpty.ts#L6)
1215
1279
 
1216
1280
  ___
1217
1281
 
@@ -1233,7 +1297,7 @@ ___
1233
1297
 
1234
1298
  #### Defined in
1235
1299
 
1236
- [isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/isEmptyObject.ts#L5)
1300
+ [isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/isEmptyObject.ts#L5)
1237
1301
 
1238
1302
  ___
1239
1303
 
@@ -1255,7 +1319,7 @@ val is Error
1255
1319
 
1256
1320
  #### Defined in
1257
1321
 
1258
- [isError.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isError.ts#L4)
1322
+ [isError.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isError.ts#L4)
1259
1323
 
1260
1324
  ___
1261
1325
 
@@ -1277,7 +1341,7 @@ val is Function
1277
1341
 
1278
1342
  #### Defined in
1279
1343
 
1280
- [isFunction.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isFunction.ts#L4)
1344
+ [isFunction.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isFunction.ts#L4)
1281
1345
 
1282
1346
  ___
1283
1347
 
@@ -1295,7 +1359,7 @@ ___
1295
1359
 
1296
1360
  #### Defined in
1297
1361
 
1298
- [isIE.ts:6](https://github.com/daysnap/utils/blob/468ef5c/src/isIE.ts#L6)
1362
+ [isIE.ts:6](https://github.com/daysnap/utils/blob/71e90a2/src/isIE.ts#L6)
1299
1363
 
1300
1364
  ___
1301
1365
 
@@ -1311,7 +1375,7 @@ ___
1311
1375
 
1312
1376
  #### Defined in
1313
1377
 
1314
- [isIOS.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isIOS.ts#L4)
1378
+ [isIOS.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isIOS.ts#L4)
1315
1379
 
1316
1380
  ___
1317
1381
 
@@ -1333,7 +1397,7 @@ ___
1333
1397
 
1334
1398
  #### Defined in
1335
1399
 
1336
- [isIdCard.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isIdCard.ts#L4)
1400
+ [isIdCard.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isIdCard.ts#L4)
1337
1401
 
1338
1402
  ___
1339
1403
 
@@ -1355,7 +1419,7 @@ ___
1355
1419
 
1356
1420
  #### Defined in
1357
1421
 
1358
- [isJSONString.ts:7](https://github.com/daysnap/utils/blob/468ef5c/src/isJSONString.ts#L7)
1422
+ [isJSONString.ts:7](https://github.com/daysnap/utils/blob/71e90a2/src/isJSONString.ts#L7)
1359
1423
 
1360
1424
  ___
1361
1425
 
@@ -1377,7 +1441,7 @@ ___
1377
1441
 
1378
1442
  #### Defined in
1379
1443
 
1380
- [isLan.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/isLan.ts#L5)
1444
+ [isLan.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/isLan.ts#L5)
1381
1445
 
1382
1446
  ___
1383
1447
 
@@ -1399,7 +1463,7 @@ ___
1399
1463
 
1400
1464
  #### Defined in
1401
1465
 
1402
- [isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/isLicenseCode.ts#L5)
1466
+ [isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/isLicenseCode.ts#L5)
1403
1467
 
1404
1468
  ___
1405
1469
 
@@ -1415,7 +1479,30 @@ ___
1415
1479
 
1416
1480
  #### Defined in
1417
1481
 
1418
- [isMobile.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isMobile.ts#L4)
1482
+ [isMobile.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isMobile.ts#L4)
1483
+
1484
+ ___
1485
+
1486
+ ### isNativeFunction
1487
+
1488
+ ▸ **isNativeFunction**(`val`): `boolean`
1489
+
1490
+ 判断是不是内置函数
1491
+ 内置函数toString后的主体代码块为 [native code]
1492
+
1493
+ #### Parameters
1494
+
1495
+ | Name | Type |
1496
+ | :------ | :------ |
1497
+ | `val` | `unknown` |
1498
+
1499
+ #### Returns
1500
+
1501
+ `boolean`
1502
+
1503
+ #### Defined in
1504
+
1505
+ [isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/71e90a2/src/isNativeFunction.ts#L7)
1419
1506
 
1420
1507
  ___
1421
1508
 
@@ -1437,7 +1524,7 @@ val is null
1437
1524
 
1438
1525
  #### Defined in
1439
1526
 
1440
- [isNull.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isNull.ts#L4)
1527
+ [isNull.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isNull.ts#L4)
1441
1528
 
1442
1529
  ___
1443
1530
 
@@ -1459,7 +1546,7 @@ val is number
1459
1546
 
1460
1547
  #### Defined in
1461
1548
 
1462
- [isNumber.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/isNumber.ts#L5)
1549
+ [isNumber.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/isNumber.ts#L5)
1463
1550
 
1464
1551
  ___
1465
1552
 
@@ -1481,7 +1568,7 @@ val is Record<string, any\>
1481
1568
 
1482
1569
  #### Defined in
1483
1570
 
1484
- [isObject.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isObject.ts#L4)
1571
+ [isObject.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isObject.ts#L4)
1485
1572
 
1486
1573
  ___
1487
1574
 
@@ -1503,7 +1590,7 @@ ___
1503
1590
 
1504
1591
  #### Defined in
1505
1592
 
1506
- [isPhone.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isPhone.ts#L4)
1593
+ [isPhone.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isPhone.ts#L4)
1507
1594
 
1508
1595
  ___
1509
1596
 
@@ -1531,7 +1618,7 @@ val is Promise<T\>
1531
1618
 
1532
1619
  #### Defined in
1533
1620
 
1534
- [isPromise.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isPromise.ts#L4)
1621
+ [isPromise.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isPromise.ts#L4)
1535
1622
 
1536
1623
  ___
1537
1624
 
@@ -1553,7 +1640,7 @@ val is RegExp
1553
1640
 
1554
1641
  #### Defined in
1555
1642
 
1556
- [isRegExp.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isRegExp.ts#L4)
1643
+ [isRegExp.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isRegExp.ts#L4)
1557
1644
 
1558
1645
  ___
1559
1646
 
@@ -1575,7 +1662,7 @@ val is string
1575
1662
 
1576
1663
  #### Defined in
1577
1664
 
1578
- [isString.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isString.ts#L4)
1665
+ [isString.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isString.ts#L4)
1579
1666
 
1580
1667
  ___
1581
1668
 
@@ -1597,7 +1684,7 @@ ___
1597
1684
 
1598
1685
  #### Defined in
1599
1686
 
1600
- [isURL.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isURL.ts#L4)
1687
+ [isURL.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isURL.ts#L4)
1601
1688
 
1602
1689
  ___
1603
1690
 
@@ -1619,7 +1706,7 @@ val is undefined
1619
1706
 
1620
1707
  #### Defined in
1621
1708
 
1622
- [isUndefined.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isUndefined.ts#L4)
1709
+ [isUndefined.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isUndefined.ts#L4)
1623
1710
 
1624
1711
  ___
1625
1712
 
@@ -1635,7 +1722,7 @@ ___
1635
1722
 
1636
1723
  #### Defined in
1637
1724
 
1638
- [isWeChat.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/isWeChat.ts#L4)
1725
+ [isWeChat.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/isWeChat.ts#L4)
1639
1726
 
1640
1727
  ___
1641
1728
 
@@ -1652,7 +1739,7 @@ https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html
1652
1739
 
1653
1740
  #### Defined in
1654
1741
 
1655
- [isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/isWeChatMiniProgram.ts#L5)
1742
+ [isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/isWeChatMiniProgram.ts#L5)
1656
1743
 
1657
1744
  ___
1658
1745
 
@@ -1672,7 +1759,7 @@ ___
1672
1759
 
1673
1760
  #### Defined in
1674
1761
 
1675
- [isWeChat.ts:12](https://github.com/daysnap/utils/blob/468ef5c/src/isWeChat.ts#L12)
1762
+ [isWeChat.ts:12](https://github.com/daysnap/utils/blob/71e90a2/src/isWeChat.ts#L12)
1676
1763
 
1677
1764
  ___
1678
1765
 
@@ -1694,7 +1781,7 @@ val is Window
1694
1781
 
1695
1782
  #### Defined in
1696
1783
 
1697
- [isWindow.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/isWindow.ts#L5)
1784
+ [isWindow.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/isWindow.ts#L5)
1698
1785
 
1699
1786
  ___
1700
1787
 
@@ -1717,7 +1804,36 @@ kebabCase('helloWorld') => hello-world
1717
1804
 
1718
1805
  #### Defined in
1719
1806
 
1720
- [kebabCase.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/kebabCase.ts#L5)
1807
+ [kebabCase.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/kebabCase.ts#L5)
1808
+
1809
+ ___
1810
+
1811
+ ### listGenerator
1812
+
1813
+ ▸ **listGenerator**<`T`\>(`length`, `fn`): `T`[]
1814
+
1815
+ list 生成器,快速生成数据
1816
+
1817
+ #### Type parameters
1818
+
1819
+ | Name | Type |
1820
+ | :------ | :------ |
1821
+ | `T` | `any` |
1822
+
1823
+ #### Parameters
1824
+
1825
+ | Name | Type | Description |
1826
+ | :------ | :------ | :------ |
1827
+ | `length` | `number` | 个数 |
1828
+ | `fn` | (`index`: `number`) => `T` | - |
1829
+
1830
+ #### Returns
1831
+
1832
+ `T`[]
1833
+
1834
+ #### Defined in
1835
+
1836
+ [listGenerator.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/listGenerator.ts#L5)
1721
1837
 
1722
1838
  ___
1723
1839
 
@@ -1742,7 +1858,7 @@ ___
1742
1858
 
1743
1859
  #### Defined in
1744
1860
 
1745
- [mousewheel.ts:22](https://github.com/daysnap/utils/blob/468ef5c/src/mousewheel.ts#L22)
1861
+ [mousewheel.ts:22](https://github.com/daysnap/utils/blob/71e90a2/src/mousewheel.ts#L22)
1746
1862
 
1747
1863
  ___
1748
1864
 
@@ -1764,7 +1880,7 @@ ___
1764
1880
 
1765
1881
  #### Defined in
1766
1882
 
1767
- [normalizePath.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/normalizePath.ts#L4)
1883
+ [normalizePath.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/normalizePath.ts#L4)
1768
1884
 
1769
1885
  ___
1770
1886
 
@@ -1794,7 +1910,7 @@ ___
1794
1910
 
1795
1911
  #### Defined in
1796
1912
 
1797
- [omit.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/omit.ts#L4)
1913
+ [omit.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/omit.ts#L4)
1798
1914
 
1799
1915
  ___
1800
1916
 
@@ -1818,7 +1934,7 @@ ___
1818
1934
 
1819
1935
  #### Defined in
1820
1936
 
1821
- [padding.ts:7](https://github.com/daysnap/utils/blob/468ef5c/src/padding.ts#L7)
1937
+ [padding.ts:7](https://github.com/daysnap/utils/blob/71e90a2/src/padding.ts#L7)
1822
1938
 
1823
1939
  ___
1824
1940
 
@@ -1840,7 +1956,7 @@ ___
1840
1956
 
1841
1957
  #### Defined in
1842
1958
 
1843
- [parseDate.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/parseDate.ts#L4)
1959
+ [parseDate.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/parseDate.ts#L4)
1844
1960
 
1845
1961
  ___
1846
1962
 
@@ -1863,7 +1979,7 @@ ___
1863
1979
 
1864
1980
  #### Defined in
1865
1981
 
1866
- [parseError.ts:8](https://github.com/daysnap/utils/blob/468ef5c/src/parseError.ts#L8)
1982
+ [parseError.ts:8](https://github.com/daysnap/utils/blob/71e90a2/src/parseError.ts#L8)
1867
1983
 
1868
1984
  ___
1869
1985
 
@@ -1893,7 +2009,7 @@ parseObject('a.b.c', 1) => { a: { b: { c: 1 } } }
1893
2009
 
1894
2010
  #### Defined in
1895
2011
 
1896
- [parseObject.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/parseObject.ts#L5)
2012
+ [parseObject.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/parseObject.ts#L5)
1897
2013
 
1898
2014
  ___
1899
2015
 
@@ -1922,7 +2038,7 @@ ___
1922
2038
 
1923
2039
  #### Defined in
1924
2040
 
1925
- [parsePath.ts:6](https://github.com/daysnap/utils/blob/468ef5c/src/parsePath.ts#L6)
2041
+ [parsePath.ts:6](https://github.com/daysnap/utils/blob/71e90a2/src/parsePath.ts#L6)
1926
2042
 
1927
2043
  ___
1928
2044
 
@@ -1945,7 +2061,7 @@ ___
1945
2061
 
1946
2062
  #### Defined in
1947
2063
 
1948
- [parseQuery.ts:8](https://github.com/daysnap/utils/blob/468ef5c/src/parseQuery.ts#L8)
2064
+ [parseQuery.ts:8](https://github.com/daysnap/utils/blob/71e90a2/src/parseQuery.ts#L8)
1949
2065
 
1950
2066
  ___
1951
2067
 
@@ -1968,7 +2084,7 @@ pascalCase('hello-world') => HelloWorld
1968
2084
 
1969
2085
  #### Defined in
1970
2086
 
1971
- [pascalCase.ts:8](https://github.com/daysnap/utils/blob/468ef5c/src/pascalCase.ts#L8)
2087
+ [pascalCase.ts:8](https://github.com/daysnap/utils/blob/71e90a2/src/pascalCase.ts#L8)
1972
2088
 
1973
2089
  ___
1974
2090
 
@@ -1998,7 +2114,7 @@ ___
1998
2114
 
1999
2115
  #### Defined in
2000
2116
 
2001
- [pick.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/pick.ts#L4)
2117
+ [pick.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/pick.ts#L4)
2002
2118
 
2003
2119
  ___
2004
2120
 
@@ -2021,7 +2137,31 @@ ___
2021
2137
 
2022
2138
  #### Defined in
2023
2139
 
2024
- [replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/replaceCrlf.ts#L4)
2140
+ [replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/replaceCrlf.ts#L4)
2141
+
2142
+ ___
2143
+
2144
+ ### requestFullScreen
2145
+
2146
+ ▸ **requestFullScreen**(`ele?`): `Promise`<`any`\>
2147
+
2148
+ 开启全屏
2149
+ 成功则 resolve , 如果不支持全屏或开启失败则 rejected
2150
+ [MDN Reference] https://developer.mozilla.org/zh-CN/docs/Web/API/Element/requestFullscreen
2151
+
2152
+ #### Parameters
2153
+
2154
+ | Name | Type | Default value |
2155
+ | :------ | :------ | :------ |
2156
+ | `ele` | `HTMLElement` | `window.document.documentElement` |
2157
+
2158
+ #### Returns
2159
+
2160
+ `Promise`<`any`\>
2161
+
2162
+ #### Defined in
2163
+
2164
+ [requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/71e90a2/src/requestFullScreen.ts#L6)
2025
2165
 
2026
2166
  ___
2027
2167
 
@@ -2047,7 +2187,7 @@ reserve(0, '--') => 0
2047
2187
 
2048
2188
  #### Defined in
2049
2189
 
2050
- [reserve.ts:8](https://github.com/daysnap/utils/blob/468ef5c/src/reserve.ts#L8)
2190
+ [reserve.ts:8](https://github.com/daysnap/utils/blob/71e90a2/src/reserve.ts#L8)
2051
2191
 
2052
2192
  ___
2053
2193
 
@@ -2071,7 +2211,7 @@ ___
2071
2211
 
2072
2212
  #### Defined in
2073
2213
 
2074
- [rgbToHex.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/rgbToHex.ts#L4)
2214
+ [rgbToHex.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/rgbToHex.ts#L4)
2075
2215
 
2076
2216
  ___
2077
2217
 
@@ -2094,7 +2234,7 @@ ___
2094
2234
 
2095
2235
  #### Defined in
2096
2236
 
2097
- [round.ts:6](https://github.com/daysnap/utils/blob/468ef5c/src/round.ts#L6)
2237
+ [round.ts:6](https://github.com/daysnap/utils/blob/71e90a2/src/round.ts#L6)
2098
2238
 
2099
2239
  ___
2100
2240
 
@@ -2110,7 +2250,7 @@ ___
2110
2250
 
2111
2251
  #### Defined in
2112
2252
 
2113
- [scrollToTop.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/scrollToTop.ts#L4)
2253
+ [scrollToTop.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/scrollToTop.ts#L4)
2114
2254
 
2115
2255
  ___
2116
2256
 
@@ -2133,7 +2273,7 @@ ___
2133
2273
 
2134
2274
  #### Defined in
2135
2275
 
2136
- [sleep.ts:6](https://github.com/daysnap/utils/blob/468ef5c/src/sleep.ts#L6)
2276
+ [sleep.ts:6](https://github.com/daysnap/utils/blob/71e90a2/src/sleep.ts#L6)
2137
2277
 
2138
2278
  ___
2139
2279
 
@@ -2162,7 +2302,7 @@ ___
2162
2302
 
2163
2303
  #### Defined in
2164
2304
 
2165
- [splitArray.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/splitArray.ts#L4)
2305
+ [splitArray.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/splitArray.ts#L4)
2166
2306
 
2167
2307
  ___
2168
2308
 
@@ -2185,7 +2325,7 @@ ___
2185
2325
 
2186
2326
  #### Defined in
2187
2327
 
2188
- [stringTrim.ts:6](https://github.com/daysnap/utils/blob/468ef5c/src/stringTrim.ts#L6)
2328
+ [stringTrim.ts:6](https://github.com/daysnap/utils/blob/71e90a2/src/stringTrim.ts#L6)
2189
2329
 
2190
2330
  ___
2191
2331
 
@@ -2207,7 +2347,7 @@ ___
2207
2347
 
2208
2348
  #### Defined in
2209
2349
 
2210
- [stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/468ef5c/src/stringifyQuery.ts#L7)
2350
+ [stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/71e90a2/src/stringifyQuery.ts#L7)
2211
2351
 
2212
2352
  ___
2213
2353
 
@@ -2250,7 +2390,7 @@ ___
2250
2390
 
2251
2391
  #### Defined in
2252
2392
 
2253
- [throttle.ts:5](https://github.com/daysnap/utils/blob/468ef5c/src/throttle.ts#L5)
2393
+ [throttle.ts:5](https://github.com/daysnap/utils/blob/71e90a2/src/throttle.ts#L5)
2254
2394
 
2255
2395
  ___
2256
2396
 
@@ -2272,7 +2412,7 @@ ___
2272
2412
 
2273
2413
  #### Defined in
2274
2414
 
2275
- [toCDB.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/toCDB.ts#L4)
2415
+ [toCDB.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/toCDB.ts#L4)
2276
2416
 
2277
2417
  ___
2278
2418
 
@@ -2294,7 +2434,7 @@ ___
2294
2434
 
2295
2435
  #### Defined in
2296
2436
 
2297
- [toDBC.ts:4](https://github.com/daysnap/utils/blob/468ef5c/src/toDBC.ts#L4)
2437
+ [toDBC.ts:4](https://github.com/daysnap/utils/blob/71e90a2/src/toDBC.ts#L4)
2298
2438
 
2299
2439
  ___
2300
2440
 
@@ -2318,4 +2458,4 @@ ___
2318
2458
 
2319
2459
  #### Defined in
2320
2460
 
2321
- [typeOf.ts:6](https://github.com/daysnap/utils/blob/468ef5c/src/typeOf.ts#L6)
2461
+ [typeOf.ts:6](https://github.com/daysnap/utils/blob/71e90a2/src/typeOf.ts#L6)