@daysnap/utils 0.0.71 → 0.0.73
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 +92 -0
- package/docs/interfaces/Trap.md +118 -0
- package/docs/modules.md +380 -102
- package/es/createWithLoading.js +1 -1
- package/es/formatAmount.d.ts +1 -1
- package/es/formatAmount.js +2 -2
- package/lib/createWithLoading.js +1 -1
- package/lib/formatAmount.d.ts +1 -1
- package/lib/formatAmount.js +2 -2
- package/package.json +1 -1
package/docs/modules.md
CHANGED
|
@@ -4,29 +4,44 @@
|
|
|
4
4
|
|
|
5
5
|
## Table of contents
|
|
6
6
|
|
|
7
|
+
### Interfaces
|
|
8
|
+
|
|
9
|
+
- [StorageManager](interfaces/StorageManager.md)
|
|
10
|
+
- [Trap](interfaces/Trap.md)
|
|
11
|
+
|
|
12
|
+
### Variables
|
|
13
|
+
|
|
14
|
+
- [trap](modules.md#trap)
|
|
15
|
+
|
|
7
16
|
### Functions
|
|
8
17
|
|
|
18
|
+
- [ato](modules.md#ato)
|
|
9
19
|
- [base64ToBlob](modules.md#base64toblob)
|
|
10
20
|
- [blobToBase64](modules.md#blobtobase64)
|
|
11
21
|
- [cached](modules.md#cached)
|
|
12
22
|
- [camelCase](modules.md#camelcase)
|
|
13
23
|
- [canvasToBlob](modules.md#canvastoblob)
|
|
14
24
|
- [capitalize](modules.md#capitalize)
|
|
25
|
+
- [clamp](modules.md#clamp)
|
|
15
26
|
- [clone](modules.md#clone)
|
|
16
27
|
- [cloneSimple](modules.md#clonesimple)
|
|
17
28
|
- [colorGenByHash](modules.md#colorgenbyhash)
|
|
18
29
|
- [compareVersion](modules.md#compareversion)
|
|
19
30
|
- [compressImage](modules.md#compressimage)
|
|
31
|
+
- [createWithLoading](modules.md#createwithloading)
|
|
20
32
|
- [debounce](modules.md#debounce)
|
|
21
33
|
- [downloadFile](modules.md#downloadfile)
|
|
22
34
|
- [each](modules.md#each)
|
|
23
35
|
- [exitFullscreen](modules.md#exitfullscreen)
|
|
36
|
+
- [factory](modules.md#factory)
|
|
24
37
|
- [filterBankCardNo](modules.md#filterbankcardno)
|
|
25
38
|
- [filterCRLF](modules.md#filtercrlf)
|
|
26
39
|
- [filterEmoji](modules.md#filteremoji)
|
|
40
|
+
- [filterEmptyValue](modules.md#filteremptyvalue)
|
|
27
41
|
- [filterIdCard](modules.md#filteridcard)
|
|
28
42
|
- [filterName](modules.md#filtername)
|
|
29
43
|
- [filterPhone](modules.md#filterphone)
|
|
44
|
+
- [filterString](modules.md#filterstring)
|
|
30
45
|
- [formatAmount](modules.md#formatamount)
|
|
31
46
|
- [formatDate](modules.md#formatdate)
|
|
32
47
|
- [formatDateStr](modules.md#formatdatestr)
|
|
@@ -53,6 +68,7 @@
|
|
|
53
68
|
- [isDate](modules.md#isdate)
|
|
54
69
|
- [isEmail](modules.md#isemail)
|
|
55
70
|
- [isEmpty](modules.md#isempty)
|
|
71
|
+
- [isEmptyArray](modules.md#isemptyarray)
|
|
56
72
|
- [isEmptyObject](modules.md#isemptyobject)
|
|
57
73
|
- [isError](modules.md#iserror)
|
|
58
74
|
- [isFunction](modules.md#isfunction)
|
|
@@ -105,8 +121,81 @@
|
|
|
105
121
|
- [toDBC](modules.md#todbc)
|
|
106
122
|
- [typeOf](modules.md#typeof)
|
|
107
123
|
|
|
124
|
+
## Variables
|
|
125
|
+
|
|
126
|
+
### trap
|
|
127
|
+
|
|
128
|
+
• `Const` **trap**: [`Trap`](interfaces/Trap.md)
|
|
129
|
+
|
|
130
|
+
#### Defined in
|
|
131
|
+
|
|
132
|
+
[trap.ts:15](https://github.com/daysnap/utils/blob/8bac5a4/src/trap.ts#L15)
|
|
133
|
+
|
|
108
134
|
## Functions
|
|
109
135
|
|
|
136
|
+
### ato
|
|
137
|
+
|
|
138
|
+
▸ **ato**<`T`, `K`\>(`options`, `labelKey`): `Record`<`T`[`K`], `T`\>
|
|
139
|
+
|
|
140
|
+
数组转换称对象
|
|
141
|
+
const options = [
|
|
142
|
+
{label: '男', value: '1'}
|
|
143
|
+
{label: '女', value: '2'}
|
|
144
|
+
]
|
|
145
|
+
const res = ato(options, 'value')
|
|
146
|
+
res = { '1': {label: '男', value: '1'}, '2': {label: '女', value: '2'} }
|
|
147
|
+
const res = ato(options, 'value', 'label')
|
|
148
|
+
res = { '1': '男', '2': '女' }
|
|
149
|
+
|
|
150
|
+
#### Type parameters
|
|
151
|
+
|
|
152
|
+
| Name | Type |
|
|
153
|
+
| :------ | :------ |
|
|
154
|
+
| `T` | extends `Record`<`string`, `any`\> |
|
|
155
|
+
| `K` | extends `string` \| `number` \| `symbol` |
|
|
156
|
+
|
|
157
|
+
#### Parameters
|
|
158
|
+
|
|
159
|
+
| Name | Type |
|
|
160
|
+
| :------ | :------ |
|
|
161
|
+
| `options` | `T`[] |
|
|
162
|
+
| `labelKey` | `K` |
|
|
163
|
+
|
|
164
|
+
#### Returns
|
|
165
|
+
|
|
166
|
+
`Record`<`T`[`K`], `T`\>
|
|
167
|
+
|
|
168
|
+
#### Defined in
|
|
169
|
+
|
|
170
|
+
[ato.ts:12](https://github.com/daysnap/utils/blob/8bac5a4/src/ato.ts#L12)
|
|
171
|
+
|
|
172
|
+
▸ **ato**<`T`, `K`\>(`options`, `labelKey`, `valueKey`): `Record`<`T`[`K`], `any`\>
|
|
173
|
+
|
|
174
|
+
#### Type parameters
|
|
175
|
+
|
|
176
|
+
| Name | Type |
|
|
177
|
+
| :------ | :------ |
|
|
178
|
+
| `T` | extends `Record`<`string`, `any`\> |
|
|
179
|
+
| `K` | extends `string` \| `number` \| `symbol` |
|
|
180
|
+
|
|
181
|
+
#### Parameters
|
|
182
|
+
|
|
183
|
+
| Name | Type |
|
|
184
|
+
| :------ | :------ |
|
|
185
|
+
| `options` | `T`[] |
|
|
186
|
+
| `labelKey` | `K` |
|
|
187
|
+
| `valueKey` | `K` |
|
|
188
|
+
|
|
189
|
+
#### Returns
|
|
190
|
+
|
|
191
|
+
`Record`<`T`[`K`], `any`\>
|
|
192
|
+
|
|
193
|
+
#### Defined in
|
|
194
|
+
|
|
195
|
+
[ato.ts:16](https://github.com/daysnap/utils/blob/8bac5a4/src/ato.ts#L16)
|
|
196
|
+
|
|
197
|
+
___
|
|
198
|
+
|
|
110
199
|
### base64ToBlob
|
|
111
200
|
|
|
112
201
|
▸ **base64ToBlob**(`base64`, `contentType?`): `Blob`
|
|
@@ -126,7 +215,7 @@ base64 转 blob
|
|
|
126
215
|
|
|
127
216
|
#### Defined in
|
|
128
217
|
|
|
129
|
-
[base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/
|
|
218
|
+
[base64ToBlob.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/base64ToBlob.ts#L6)
|
|
130
219
|
|
|
131
220
|
___
|
|
132
221
|
|
|
@@ -148,7 +237,7 @@ blob 转 base64
|
|
|
148
237
|
|
|
149
238
|
#### Defined in
|
|
150
239
|
|
|
151
|
-
[blobToBase64.ts:4](https://github.com/daysnap/utils/blob/
|
|
240
|
+
[blobToBase64.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/blobToBase64.ts#L4)
|
|
152
241
|
|
|
153
242
|
___
|
|
154
243
|
|
|
@@ -189,7 +278,7 @@ ___
|
|
|
189
278
|
|
|
190
279
|
#### Defined in
|
|
191
280
|
|
|
192
|
-
[cached.ts:5](https://github.com/daysnap/utils/blob/
|
|
281
|
+
[cached.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/cached.ts#L5)
|
|
193
282
|
|
|
194
283
|
___
|
|
195
284
|
|
|
@@ -212,7 +301,7 @@ camelCase('hello-world') => helloWorld
|
|
|
212
301
|
|
|
213
302
|
#### Defined in
|
|
214
303
|
|
|
215
|
-
[camelCase.ts:5](https://github.com/daysnap/utils/blob/
|
|
304
|
+
[camelCase.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/camelCase.ts#L5)
|
|
216
305
|
|
|
217
306
|
___
|
|
218
307
|
|
|
@@ -236,7 +325,7 @@ canvas 转 blob 文件
|
|
|
236
325
|
|
|
237
326
|
#### Defined in
|
|
238
327
|
|
|
239
|
-
[canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/
|
|
328
|
+
[canvasToBlob.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/canvasToBlob.ts#L4)
|
|
240
329
|
|
|
241
330
|
___
|
|
242
331
|
|
|
@@ -259,7 +348,31 @@ capitalize('hello world') => Hello world
|
|
|
259
348
|
|
|
260
349
|
#### Defined in
|
|
261
350
|
|
|
262
|
-
[capitalize.ts:5](https://github.com/daysnap/utils/blob/
|
|
351
|
+
[capitalize.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/capitalize.ts#L5)
|
|
352
|
+
|
|
353
|
+
___
|
|
354
|
+
|
|
355
|
+
### clamp
|
|
356
|
+
|
|
357
|
+
▸ **clamp**(`min`, `val`, `max`): `number`
|
|
358
|
+
|
|
359
|
+
首选值超出最小值,返回最小值;首选值超出最大值,返回最大值;其余返回首选值
|
|
360
|
+
|
|
361
|
+
#### Parameters
|
|
362
|
+
|
|
363
|
+
| Name | Type | Description |
|
|
364
|
+
| :------ | :------ | :------ |
|
|
365
|
+
| `min` | `number` | 最小值 |
|
|
366
|
+
| `val` | `number` | - |
|
|
367
|
+
| `max` | `number` | 最大值 |
|
|
368
|
+
|
|
369
|
+
#### Returns
|
|
370
|
+
|
|
371
|
+
`number`
|
|
372
|
+
|
|
373
|
+
#### Defined in
|
|
374
|
+
|
|
375
|
+
[clamp.ts:7](https://github.com/daysnap/utils/blob/8bac5a4/src/clamp.ts#L7)
|
|
263
376
|
|
|
264
377
|
___
|
|
265
378
|
|
|
@@ -287,7 +400,7 @@ ___
|
|
|
287
400
|
|
|
288
401
|
#### Defined in
|
|
289
402
|
|
|
290
|
-
[clone.ts:8](https://github.com/daysnap/utils/blob/
|
|
403
|
+
[clone.ts:8](https://github.com/daysnap/utils/blob/8bac5a4/src/clone.ts#L8)
|
|
291
404
|
|
|
292
405
|
___
|
|
293
406
|
|
|
@@ -315,7 +428,7 @@ ___
|
|
|
315
428
|
|
|
316
429
|
#### Defined in
|
|
317
430
|
|
|
318
|
-
[cloneSimple.ts:7](https://github.com/daysnap/utils/blob/
|
|
431
|
+
[cloneSimple.ts:7](https://github.com/daysnap/utils/blob/8bac5a4/src/cloneSimple.ts#L7)
|
|
319
432
|
|
|
320
433
|
___
|
|
321
434
|
|
|
@@ -337,7 +450,7 @@ ___
|
|
|
337
450
|
|
|
338
451
|
#### Defined in
|
|
339
452
|
|
|
340
|
-
[createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/
|
|
453
|
+
[createHexColorByHash.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/createHexColorByHash.ts#L4)
|
|
341
454
|
|
|
342
455
|
___
|
|
343
456
|
|
|
@@ -363,7 +476,7 @@ ___
|
|
|
363
476
|
|
|
364
477
|
#### Defined in
|
|
365
478
|
|
|
366
|
-
[compareVersion.ts:9](https://github.com/daysnap/utils/blob/
|
|
479
|
+
[compareVersion.ts:9](https://github.com/daysnap/utils/blob/8bac5a4/src/compareVersion.ts#L9)
|
|
367
480
|
|
|
368
481
|
___
|
|
369
482
|
|
|
@@ -385,7 +498,70 @@ ___
|
|
|
385
498
|
|
|
386
499
|
#### Defined in
|
|
387
500
|
|
|
388
|
-
[compressImage.ts:6](https://github.com/daysnap/utils/blob/
|
|
501
|
+
[compressImage.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/compressImage.ts#L6)
|
|
502
|
+
|
|
503
|
+
___
|
|
504
|
+
|
|
505
|
+
### createWithLoading
|
|
506
|
+
|
|
507
|
+
▸ **createWithLoading**<`O`\>(`showLoading`, `defaultOptions?`): <T\>(`fn`: `T`, `options`: `O`) => (...`params`: [...Parameters<T\>[], O?]) => `Promise`<`Awaited`<`ReturnType`<`T`\>\>\>
|
|
508
|
+
|
|
509
|
+
loading 生成器
|
|
510
|
+
const withLoading = createWithLoading(() => showLoading())
|
|
511
|
+
const fn = withLoading(async () => { // ... })
|
|
512
|
+
fn() 执行的时候就会执行showLoading
|
|
513
|
+
|
|
514
|
+
#### Type parameters
|
|
515
|
+
|
|
516
|
+
| Name | Type |
|
|
517
|
+
| :------ | :------ |
|
|
518
|
+
| `O` | `any` |
|
|
519
|
+
|
|
520
|
+
#### Parameters
|
|
521
|
+
|
|
522
|
+
| Name | Type |
|
|
523
|
+
| :------ | :------ |
|
|
524
|
+
| `showLoading` | (`options`: `O`) => `Loose`<{ `close`: () => `any` }\> |
|
|
525
|
+
| `defaultOptions?` | `O` |
|
|
526
|
+
|
|
527
|
+
#### Returns
|
|
528
|
+
|
|
529
|
+
`fn`
|
|
530
|
+
|
|
531
|
+
▸ <`T`\>(`fn`, `options?`): (...`params`: [...Parameters<T\>[], O?]) => `Promise`<`Awaited`<`ReturnType`<`T`\>\>\>
|
|
532
|
+
|
|
533
|
+
##### Type parameters
|
|
534
|
+
|
|
535
|
+
| Name | Type |
|
|
536
|
+
| :------ | :------ |
|
|
537
|
+
| `T` | extends (...`args`: `any`[]) => `Promise`<`any`\> |
|
|
538
|
+
|
|
539
|
+
##### Parameters
|
|
540
|
+
|
|
541
|
+
| Name | Type |
|
|
542
|
+
| :------ | :------ |
|
|
543
|
+
| `fn` | `T` |
|
|
544
|
+
| `options` | `O` |
|
|
545
|
+
|
|
546
|
+
##### Returns
|
|
547
|
+
|
|
548
|
+
`fn`
|
|
549
|
+
|
|
550
|
+
▸ (`...params`): `Promise`<`Awaited`<`ReturnType`<`T`\>\>\>
|
|
551
|
+
|
|
552
|
+
##### Parameters
|
|
553
|
+
|
|
554
|
+
| Name | Type |
|
|
555
|
+
| :------ | :------ |
|
|
556
|
+
| `...params` | [...Parameters<T\>[], O?] |
|
|
557
|
+
|
|
558
|
+
##### Returns
|
|
559
|
+
|
|
560
|
+
`Promise`<`Awaited`<`ReturnType`<`T`\>\>\>
|
|
561
|
+
|
|
562
|
+
#### Defined in
|
|
563
|
+
|
|
564
|
+
[createWithLoading.ts:9](https://github.com/daysnap/utils/blob/8bac5a4/src/createWithLoading.ts#L9)
|
|
389
565
|
|
|
390
566
|
___
|
|
391
567
|
|
|
@@ -428,7 +604,7 @@ ___
|
|
|
428
604
|
|
|
429
605
|
#### Defined in
|
|
430
606
|
|
|
431
|
-
[debounce.ts:5](https://github.com/daysnap/utils/blob/
|
|
607
|
+
[debounce.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/debounce.ts#L5)
|
|
432
608
|
|
|
433
609
|
___
|
|
434
610
|
|
|
@@ -452,7 +628,7 @@ ___
|
|
|
452
628
|
|
|
453
629
|
#### Defined in
|
|
454
630
|
|
|
455
|
-
[downloadFile.ts:4](https://github.com/daysnap/utils/blob/
|
|
631
|
+
[downloadFile.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/downloadFile.ts#L4)
|
|
456
632
|
|
|
457
633
|
___
|
|
458
634
|
|
|
@@ -481,7 +657,7 @@ ___
|
|
|
481
657
|
|
|
482
658
|
#### Defined in
|
|
483
659
|
|
|
484
|
-
[each.ts:4](https://github.com/daysnap/utils/blob/
|
|
660
|
+
[each.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/each.ts#L4)
|
|
485
661
|
|
|
486
662
|
▸ **each**<`T`\>(`data`, `callback`): `void`
|
|
487
663
|
|
|
@@ -504,7 +680,7 @@ ___
|
|
|
504
680
|
|
|
505
681
|
#### Defined in
|
|
506
682
|
|
|
507
|
-
[each.ts:8](https://github.com/daysnap/utils/blob/
|
|
683
|
+
[each.ts:8](https://github.com/daysnap/utils/blob/8bac5a4/src/each.ts#L8)
|
|
508
684
|
|
|
509
685
|
___
|
|
510
686
|
|
|
@@ -522,7 +698,36 @@ ___
|
|
|
522
698
|
|
|
523
699
|
#### Defined in
|
|
524
700
|
|
|
525
|
-
[exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/
|
|
701
|
+
[exitFullscreen.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/exitFullscreen.ts#L6)
|
|
702
|
+
|
|
703
|
+
___
|
|
704
|
+
|
|
705
|
+
### factory
|
|
706
|
+
|
|
707
|
+
▸ **factory**(`type`): `Object`
|
|
708
|
+
|
|
709
|
+
#### Parameters
|
|
710
|
+
|
|
711
|
+
| Name | Type |
|
|
712
|
+
| :------ | :------ |
|
|
713
|
+
| `type` | ``"sessionStorage"`` \| ``"localStorage"`` |
|
|
714
|
+
|
|
715
|
+
#### Returns
|
|
716
|
+
|
|
717
|
+
`Object`
|
|
718
|
+
|
|
719
|
+
| Name | Type |
|
|
720
|
+
| :------ | :------ |
|
|
721
|
+
| `clear` | () => `void` |
|
|
722
|
+
| `generate` | <T\>(`key`: `string`) => { `getItem`: (`defaultVal?`: `Partial`<`T`\>) => `T` ; `removeItem`: () => `void` ; `setItem`: (`val`: `T`) => `T` ; `updateItem`: (`val`: `Partial`<`T`\>) => `T` } |
|
|
723
|
+
| `getItem` | <T\>(`key`: `string`, `defaultVal`: ``null`` \| `Partial`<`T`\>) => `T` |
|
|
724
|
+
| `removeItem` | (`key`: `string`) => `void` |
|
|
725
|
+
| `setItem` | <T\>(`key`: `string`, `val`: `T`) => `T` |
|
|
726
|
+
| `updateItem` | <T\>(`key`: `string`, `val`: `Partial`<`T`\>) => `T` |
|
|
727
|
+
|
|
728
|
+
#### Defined in
|
|
729
|
+
|
|
730
|
+
[storage/factory.ts:8](https://github.com/daysnap/utils/blob/8bac5a4/src/storage/factory.ts#L8)
|
|
526
731
|
|
|
527
732
|
___
|
|
528
733
|
|
|
@@ -544,7 +749,7 @@ ___
|
|
|
544
749
|
|
|
545
750
|
#### Defined in
|
|
546
751
|
|
|
547
|
-
[filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/
|
|
752
|
+
[filterBankCardNo.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/filterBankCardNo.ts#L4)
|
|
548
753
|
|
|
549
754
|
___
|
|
550
755
|
|
|
@@ -566,7 +771,7 @@ ___
|
|
|
566
771
|
|
|
567
772
|
#### Defined in
|
|
568
773
|
|
|
569
|
-
[filterCRLF.ts:4](https://github.com/daysnap/utils/blob/
|
|
774
|
+
[filterCRLF.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/filterCRLF.ts#L4)
|
|
570
775
|
|
|
571
776
|
___
|
|
572
777
|
|
|
@@ -588,7 +793,30 @@ ___
|
|
|
588
793
|
|
|
589
794
|
#### Defined in
|
|
590
795
|
|
|
591
|
-
[filterEmoji.ts:4](https://github.com/daysnap/utils/blob/
|
|
796
|
+
[filterEmoji.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/filterEmoji.ts#L4)
|
|
797
|
+
|
|
798
|
+
___
|
|
799
|
+
|
|
800
|
+
### filterEmptyValue
|
|
801
|
+
|
|
802
|
+
▸ **filterEmptyValue**(`obj`, `expand?`): `Record`<`string`, `any`\>
|
|
803
|
+
|
|
804
|
+
过滤对象的 undefined null '' 属性,返回一个新对象
|
|
805
|
+
|
|
806
|
+
#### Parameters
|
|
807
|
+
|
|
808
|
+
| Name | Type | Default value | Description |
|
|
809
|
+
| :------ | :------ | :------ | :------ |
|
|
810
|
+
| `obj` | `Record`<`string`, `any`\> | `undefined` | 需要过滤的对象 |
|
|
811
|
+
| `expand` | `boolean` \| (`key`: `string`, `value`: `any`) => `boolean` | `false` | 如果是传的是布尔类型 true, 则还会过滤空数组、空对象的情况 |
|
|
812
|
+
|
|
813
|
+
#### Returns
|
|
814
|
+
|
|
815
|
+
`Record`<`string`, `any`\>
|
|
816
|
+
|
|
817
|
+
#### Defined in
|
|
818
|
+
|
|
819
|
+
[filterEmptyValue.ts:12](https://github.com/daysnap/utils/blob/8bac5a4/src/filterEmptyValue.ts#L12)
|
|
592
820
|
|
|
593
821
|
___
|
|
594
822
|
|
|
@@ -611,7 +839,7 @@ ___
|
|
|
611
839
|
|
|
612
840
|
#### Defined in
|
|
613
841
|
|
|
614
|
-
[filterIdCard.ts:5](https://github.com/daysnap/utils/blob/
|
|
842
|
+
[filterIdCard.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/filterIdCard.ts#L5)
|
|
615
843
|
|
|
616
844
|
___
|
|
617
845
|
|
|
@@ -633,7 +861,7 @@ ___
|
|
|
633
861
|
|
|
634
862
|
#### Defined in
|
|
635
863
|
|
|
636
|
-
[filterName.ts:4](https://github.com/daysnap/utils/blob/
|
|
864
|
+
[filterName.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/filterName.ts#L4)
|
|
637
865
|
|
|
638
866
|
___
|
|
639
867
|
|
|
@@ -658,13 +886,40 @@ filterPhone('13177778888', ' ') => 131 **** 8888
|
|
|
658
886
|
|
|
659
887
|
#### Defined in
|
|
660
888
|
|
|
661
|
-
[filterPhone.ts:6](https://github.com/daysnap/utils/blob/
|
|
889
|
+
[filterPhone.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/filterPhone.ts#L6)
|
|
890
|
+
|
|
891
|
+
___
|
|
892
|
+
|
|
893
|
+
### filterString
|
|
894
|
+
|
|
895
|
+
▸ **filterString**(`val`, `sep?`, `start?`, `end?`): `string`
|
|
896
|
+
|
|
897
|
+
过滤字符串
|
|
898
|
+
const str = filterString('13188888888', '*', 3, 7)
|
|
899
|
+
str = '131****8888'
|
|
900
|
+
|
|
901
|
+
#### Parameters
|
|
902
|
+
|
|
903
|
+
| Name | Type | Default value |
|
|
904
|
+
| :------ | :------ | :------ |
|
|
905
|
+
| `val` | `string` | `undefined` |
|
|
906
|
+
| `sep` | `string` | `'*'` |
|
|
907
|
+
| `start` | `number` | `0` |
|
|
908
|
+
| `end?` | `number` | `undefined` |
|
|
909
|
+
|
|
910
|
+
#### Returns
|
|
911
|
+
|
|
912
|
+
`string`
|
|
913
|
+
|
|
914
|
+
#### Defined in
|
|
915
|
+
|
|
916
|
+
[filterString.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/filterString.ts#L6)
|
|
662
917
|
|
|
663
918
|
___
|
|
664
919
|
|
|
665
920
|
### formatAmount
|
|
666
921
|
|
|
667
|
-
▸ **formatAmount**(`s`, `radix?`): `string`
|
|
922
|
+
▸ **formatAmount**(`s`, `radix?`, `digits?`): `string`
|
|
668
923
|
|
|
669
924
|
格式化金额,默认元
|
|
670
925
|
|
|
@@ -674,6 +929,7 @@ ___
|
|
|
674
929
|
| :------ | :------ | :------ |
|
|
675
930
|
| `s` | `string` \| `number` | `undefined` |
|
|
676
931
|
| `radix` | `number` | `1` |
|
|
932
|
+
| `digits` | `number` | `2` |
|
|
677
933
|
|
|
678
934
|
#### Returns
|
|
679
935
|
|
|
@@ -681,7 +937,7 @@ ___
|
|
|
681
937
|
|
|
682
938
|
#### Defined in
|
|
683
939
|
|
|
684
|
-
[formatAmount.ts:4](https://github.com/daysnap/utils/blob/
|
|
940
|
+
[formatAmount.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/formatAmount.ts#L4)
|
|
685
941
|
|
|
686
942
|
___
|
|
687
943
|
|
|
@@ -705,7 +961,7 @@ ___
|
|
|
705
961
|
|
|
706
962
|
#### Defined in
|
|
707
963
|
|
|
708
|
-
[formatDate.ts:8](https://github.com/daysnap/utils/blob/
|
|
964
|
+
[formatDate.ts:8](https://github.com/daysnap/utils/blob/8bac5a4/src/formatDate.ts#L8)
|
|
709
965
|
|
|
710
966
|
___
|
|
711
967
|
|
|
@@ -728,7 +984,7 @@ fix iOS 日期时间格式如果是 - 就会报错的问题
|
|
|
728
984
|
|
|
729
985
|
#### Defined in
|
|
730
986
|
|
|
731
|
-
[formatDateStr.ts:5](https://github.com/daysnap/utils/blob/
|
|
987
|
+
[formatDateStr.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/formatDateStr.ts#L5)
|
|
732
988
|
|
|
733
989
|
___
|
|
734
990
|
|
|
@@ -753,7 +1009,7 @@ formatMessage({ a: '123', b: { ba: '456' } }, ['b.ba']) => '456'
|
|
|
753
1009
|
|
|
754
1010
|
#### Defined in
|
|
755
1011
|
|
|
756
|
-
[formatMessage.ts:11](https://github.com/daysnap/utils/blob/
|
|
1012
|
+
[formatMessage.ts:11](https://github.com/daysnap/utils/blob/8bac5a4/src/formatMessage.ts#L11)
|
|
757
1013
|
|
|
758
1014
|
___
|
|
759
1015
|
|
|
@@ -785,7 +1041,7 @@ rest = { xxx: 1 }
|
|
|
785
1041
|
|
|
786
1042
|
#### Defined in
|
|
787
1043
|
|
|
788
|
-
[formatPathParams.ts:8](https://github.com/daysnap/utils/blob/
|
|
1044
|
+
[formatPathParams.ts:8](https://github.com/daysnap/utils/blob/8bac5a4/src/formatPathParams.ts#L8)
|
|
789
1045
|
|
|
790
1046
|
___
|
|
791
1047
|
|
|
@@ -807,7 +1063,7 @@ ___
|
|
|
807
1063
|
|
|
808
1064
|
#### Defined in
|
|
809
1065
|
|
|
810
|
-
[getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/
|
|
1066
|
+
[getBlobByUrl.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/getBlobByUrl.ts#L4)
|
|
811
1067
|
|
|
812
1068
|
___
|
|
813
1069
|
|
|
@@ -830,7 +1086,7 @@ ___
|
|
|
830
1086
|
|
|
831
1087
|
#### Defined in
|
|
832
1088
|
|
|
833
|
-
[storage/index.ts:
|
|
1089
|
+
[storage/index.ts:9](https://github.com/daysnap/utils/blob/8bac5a4/src/storage/index.ts#L9)
|
|
834
1090
|
|
|
835
1091
|
___
|
|
836
1092
|
|
|
@@ -852,7 +1108,7 @@ ___
|
|
|
852
1108
|
|
|
853
1109
|
#### Defined in
|
|
854
1110
|
|
|
855
|
-
[getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/
|
|
1111
|
+
[getDayMillisecond.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/getDayMillisecond.ts#L4)
|
|
856
1112
|
|
|
857
1113
|
___
|
|
858
1114
|
|
|
@@ -874,7 +1130,7 @@ ___
|
|
|
874
1130
|
|
|
875
1131
|
#### Defined in
|
|
876
1132
|
|
|
877
|
-
[getImageInfo.ts:4](https://github.com/daysnap/utils/blob/
|
|
1133
|
+
[getImageInfo.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/getImageInfo.ts#L4)
|
|
878
1134
|
|
|
879
1135
|
___
|
|
880
1136
|
|
|
@@ -897,7 +1153,7 @@ ___
|
|
|
897
1153
|
|
|
898
1154
|
#### Defined in
|
|
899
1155
|
|
|
900
|
-
[storage/index.ts:
|
|
1156
|
+
[storage/index.ts:9](https://github.com/daysnap/utils/blob/8bac5a4/src/storage/index.ts#L9)
|
|
901
1157
|
|
|
902
1158
|
___
|
|
903
1159
|
|
|
@@ -920,7 +1176,7 @@ ___
|
|
|
920
1176
|
|
|
921
1177
|
#### Defined in
|
|
922
1178
|
|
|
923
|
-
[getRandom.ts:7](https://github.com/daysnap/utils/blob/
|
|
1179
|
+
[getRandom.ts:7](https://github.com/daysnap/utils/blob/8bac5a4/src/getRandom.ts#L7)
|
|
924
1180
|
|
|
925
1181
|
___
|
|
926
1182
|
|
|
@@ -936,7 +1192,7 @@ ___
|
|
|
936
1192
|
|
|
937
1193
|
#### Defined in
|
|
938
1194
|
|
|
939
|
-
[getRandomColor.ts:4](https://github.com/daysnap/utils/blob/
|
|
1195
|
+
[getRandomColor.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/getRandomColor.ts#L4)
|
|
940
1196
|
|
|
941
1197
|
___
|
|
942
1198
|
|
|
@@ -958,7 +1214,7 @@ ___
|
|
|
958
1214
|
|
|
959
1215
|
#### Defined in
|
|
960
1216
|
|
|
961
|
-
[getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/
|
|
1217
|
+
[getRandomNumber.ts:7](https://github.com/daysnap/utils/blob/8bac5a4/src/getRandomNumber.ts#L7)
|
|
962
1218
|
|
|
963
1219
|
___
|
|
964
1220
|
|
|
@@ -980,7 +1236,7 @@ ___
|
|
|
980
1236
|
|
|
981
1237
|
#### Defined in
|
|
982
1238
|
|
|
983
|
-
[getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/
|
|
1239
|
+
[getVideoInfo.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/getVideoInfo.ts#L4)
|
|
984
1240
|
|
|
985
1241
|
___
|
|
986
1242
|
|
|
@@ -996,7 +1252,7 @@ ___
|
|
|
996
1252
|
|
|
997
1253
|
#### Defined in
|
|
998
1254
|
|
|
999
|
-
[inBrowser.ts:4](https://github.com/daysnap/utils/blob/
|
|
1255
|
+
[inBrowser.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/inBrowser.ts#L4)
|
|
1000
1256
|
|
|
1001
1257
|
___
|
|
1002
1258
|
|
|
@@ -1018,7 +1274,7 @@ ___
|
|
|
1018
1274
|
|
|
1019
1275
|
#### Defined in
|
|
1020
1276
|
|
|
1021
|
-
[insertLink.ts:4](https://github.com/daysnap/utils/blob/
|
|
1277
|
+
[insertLink.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/insertLink.ts#L4)
|
|
1022
1278
|
|
|
1023
1279
|
▸ **insertLink**(`href`, `callback`): `void`
|
|
1024
1280
|
|
|
@@ -1035,7 +1291,7 @@ ___
|
|
|
1035
1291
|
|
|
1036
1292
|
#### Defined in
|
|
1037
1293
|
|
|
1038
|
-
[insertLink.ts:5](https://github.com/daysnap/utils/blob/
|
|
1294
|
+
[insertLink.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/insertLink.ts#L5)
|
|
1039
1295
|
|
|
1040
1296
|
___
|
|
1041
1297
|
|
|
@@ -1057,7 +1313,7 @@ ___
|
|
|
1057
1313
|
|
|
1058
1314
|
#### Defined in
|
|
1059
1315
|
|
|
1060
|
-
[insertScript.ts:4](https://github.com/daysnap/utils/blob/
|
|
1316
|
+
[insertScript.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/insertScript.ts#L4)
|
|
1061
1317
|
|
|
1062
1318
|
▸ **insertScript**(`src`, `callback`): `void`
|
|
1063
1319
|
|
|
@@ -1074,7 +1330,7 @@ ___
|
|
|
1074
1330
|
|
|
1075
1331
|
#### Defined in
|
|
1076
1332
|
|
|
1077
|
-
[insertScript.ts:5](https://github.com/daysnap/utils/blob/
|
|
1333
|
+
[insertScript.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/insertScript.ts#L5)
|
|
1078
1334
|
|
|
1079
1335
|
___
|
|
1080
1336
|
|
|
@@ -1096,7 +1352,7 @@ ___
|
|
|
1096
1352
|
|
|
1097
1353
|
#### Defined in
|
|
1098
1354
|
|
|
1099
|
-
[insertStyle.ts:4](https://github.com/daysnap/utils/blob/
|
|
1355
|
+
[insertStyle.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/insertStyle.ts#L4)
|
|
1100
1356
|
|
|
1101
1357
|
___
|
|
1102
1358
|
|
|
@@ -1125,7 +1381,7 @@ isAmount('1.123') => false
|
|
|
1125
1381
|
|
|
1126
1382
|
#### Defined in
|
|
1127
1383
|
|
|
1128
|
-
[isAmount.ts:11](https://github.com/daysnap/utils/blob/
|
|
1384
|
+
[isAmount.ts:11](https://github.com/daysnap/utils/blob/8bac5a4/src/isAmount.ts#L11)
|
|
1129
1385
|
|
|
1130
1386
|
___
|
|
1131
1387
|
|
|
@@ -1141,7 +1397,7 @@ ___
|
|
|
1141
1397
|
|
|
1142
1398
|
#### Defined in
|
|
1143
1399
|
|
|
1144
|
-
[isAndroid.ts:4](https://github.com/daysnap/utils/blob/
|
|
1400
|
+
[isAndroid.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isAndroid.ts#L4)
|
|
1145
1401
|
|
|
1146
1402
|
___
|
|
1147
1403
|
|
|
@@ -1165,7 +1421,7 @@ val is any[]
|
|
|
1165
1421
|
|
|
1166
1422
|
#### Defined in
|
|
1167
1423
|
|
|
1168
|
-
[isArray.ts:6](https://github.com/daysnap/utils/blob/
|
|
1424
|
+
[isArray.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/isArray.ts#L6)
|
|
1169
1425
|
|
|
1170
1426
|
___
|
|
1171
1427
|
|
|
@@ -1187,7 +1443,7 @@ val is boolean
|
|
|
1187
1443
|
|
|
1188
1444
|
#### Defined in
|
|
1189
1445
|
|
|
1190
|
-
[isBoolean.ts:5](https://github.com/daysnap/utils/blob/
|
|
1446
|
+
[isBoolean.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/isBoolean.ts#L5)
|
|
1191
1447
|
|
|
1192
1448
|
___
|
|
1193
1449
|
|
|
@@ -1209,7 +1465,7 @@ ___
|
|
|
1209
1465
|
|
|
1210
1466
|
#### Defined in
|
|
1211
1467
|
|
|
1212
|
-
[isChinese.ts:4](https://github.com/daysnap/utils/blob/
|
|
1468
|
+
[isChinese.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isChinese.ts#L4)
|
|
1213
1469
|
|
|
1214
1470
|
___
|
|
1215
1471
|
|
|
@@ -1231,7 +1487,7 @@ val is Date
|
|
|
1231
1487
|
|
|
1232
1488
|
#### Defined in
|
|
1233
1489
|
|
|
1234
|
-
[isDate.ts:4](https://github.com/daysnap/utils/blob/
|
|
1490
|
+
[isDate.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isDate.ts#L4)
|
|
1235
1491
|
|
|
1236
1492
|
___
|
|
1237
1493
|
|
|
@@ -1253,7 +1509,7 @@ ___
|
|
|
1253
1509
|
|
|
1254
1510
|
#### Defined in
|
|
1255
1511
|
|
|
1256
|
-
[isEmail.ts:4](https://github.com/daysnap/utils/blob/
|
|
1512
|
+
[isEmail.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isEmail.ts#L4)
|
|
1257
1513
|
|
|
1258
1514
|
___
|
|
1259
1515
|
|
|
@@ -1275,7 +1531,29 @@ ___
|
|
|
1275
1531
|
|
|
1276
1532
|
#### Defined in
|
|
1277
1533
|
|
|
1278
|
-
[isEmpty.ts:6](https://github.com/daysnap/utils/blob/
|
|
1534
|
+
[isEmpty.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/isEmpty.ts#L6)
|
|
1535
|
+
|
|
1536
|
+
___
|
|
1537
|
+
|
|
1538
|
+
### isEmptyArray
|
|
1539
|
+
|
|
1540
|
+
▸ **isEmptyArray**(`val`): `boolean`
|
|
1541
|
+
|
|
1542
|
+
判断是否是空数组
|
|
1543
|
+
|
|
1544
|
+
#### Parameters
|
|
1545
|
+
|
|
1546
|
+
| Name | Type |
|
|
1547
|
+
| :------ | :------ |
|
|
1548
|
+
| `val` | `unknown` |
|
|
1549
|
+
|
|
1550
|
+
#### Returns
|
|
1551
|
+
|
|
1552
|
+
`boolean`
|
|
1553
|
+
|
|
1554
|
+
#### Defined in
|
|
1555
|
+
|
|
1556
|
+
[isEmptyArray.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/isEmptyArray.ts#L6)
|
|
1279
1557
|
|
|
1280
1558
|
___
|
|
1281
1559
|
|
|
@@ -1297,7 +1575,7 @@ ___
|
|
|
1297
1575
|
|
|
1298
1576
|
#### Defined in
|
|
1299
1577
|
|
|
1300
|
-
[isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/
|
|
1578
|
+
[isEmptyObject.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/isEmptyObject.ts#L5)
|
|
1301
1579
|
|
|
1302
1580
|
___
|
|
1303
1581
|
|
|
@@ -1319,7 +1597,7 @@ val is Error
|
|
|
1319
1597
|
|
|
1320
1598
|
#### Defined in
|
|
1321
1599
|
|
|
1322
|
-
[isError.ts:4](https://github.com/daysnap/utils/blob/
|
|
1600
|
+
[isError.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isError.ts#L4)
|
|
1323
1601
|
|
|
1324
1602
|
___
|
|
1325
1603
|
|
|
@@ -1341,7 +1619,7 @@ val is Function
|
|
|
1341
1619
|
|
|
1342
1620
|
#### Defined in
|
|
1343
1621
|
|
|
1344
|
-
[isFunction.ts:4](https://github.com/daysnap/utils/blob/
|
|
1622
|
+
[isFunction.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isFunction.ts#L4)
|
|
1345
1623
|
|
|
1346
1624
|
___
|
|
1347
1625
|
|
|
@@ -1359,7 +1637,7 @@ ___
|
|
|
1359
1637
|
|
|
1360
1638
|
#### Defined in
|
|
1361
1639
|
|
|
1362
|
-
[isIE.ts:6](https://github.com/daysnap/utils/blob/
|
|
1640
|
+
[isIE.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/isIE.ts#L6)
|
|
1363
1641
|
|
|
1364
1642
|
___
|
|
1365
1643
|
|
|
@@ -1375,7 +1653,7 @@ ___
|
|
|
1375
1653
|
|
|
1376
1654
|
#### Defined in
|
|
1377
1655
|
|
|
1378
|
-
[isIOS.ts:4](https://github.com/daysnap/utils/blob/
|
|
1656
|
+
[isIOS.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isIOS.ts#L4)
|
|
1379
1657
|
|
|
1380
1658
|
___
|
|
1381
1659
|
|
|
@@ -1397,7 +1675,7 @@ ___
|
|
|
1397
1675
|
|
|
1398
1676
|
#### Defined in
|
|
1399
1677
|
|
|
1400
|
-
[isIdCard.ts:4](https://github.com/daysnap/utils/blob/
|
|
1678
|
+
[isIdCard.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isIdCard.ts#L4)
|
|
1401
1679
|
|
|
1402
1680
|
___
|
|
1403
1681
|
|
|
@@ -1419,7 +1697,7 @@ ___
|
|
|
1419
1697
|
|
|
1420
1698
|
#### Defined in
|
|
1421
1699
|
|
|
1422
|
-
[isJSONString.ts:7](https://github.com/daysnap/utils/blob/
|
|
1700
|
+
[isJSONString.ts:7](https://github.com/daysnap/utils/blob/8bac5a4/src/isJSONString.ts#L7)
|
|
1423
1701
|
|
|
1424
1702
|
___
|
|
1425
1703
|
|
|
@@ -1441,7 +1719,7 @@ ___
|
|
|
1441
1719
|
|
|
1442
1720
|
#### Defined in
|
|
1443
1721
|
|
|
1444
|
-
[isLan.ts:5](https://github.com/daysnap/utils/blob/
|
|
1722
|
+
[isLan.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/isLan.ts#L5)
|
|
1445
1723
|
|
|
1446
1724
|
___
|
|
1447
1725
|
|
|
@@ -1463,7 +1741,7 @@ ___
|
|
|
1463
1741
|
|
|
1464
1742
|
#### Defined in
|
|
1465
1743
|
|
|
1466
|
-
[isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/
|
|
1744
|
+
[isLicenseCode.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/isLicenseCode.ts#L5)
|
|
1467
1745
|
|
|
1468
1746
|
___
|
|
1469
1747
|
|
|
@@ -1479,7 +1757,7 @@ ___
|
|
|
1479
1757
|
|
|
1480
1758
|
#### Defined in
|
|
1481
1759
|
|
|
1482
|
-
[isMobile.ts:4](https://github.com/daysnap/utils/blob/
|
|
1760
|
+
[isMobile.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isMobile.ts#L4)
|
|
1483
1761
|
|
|
1484
1762
|
___
|
|
1485
1763
|
|
|
@@ -1502,7 +1780,7 @@ ___
|
|
|
1502
1780
|
|
|
1503
1781
|
#### Defined in
|
|
1504
1782
|
|
|
1505
|
-
[isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/
|
|
1783
|
+
[isNativeFunction.ts:7](https://github.com/daysnap/utils/blob/8bac5a4/src/isNativeFunction.ts#L7)
|
|
1506
1784
|
|
|
1507
1785
|
___
|
|
1508
1786
|
|
|
@@ -1524,7 +1802,7 @@ val is null
|
|
|
1524
1802
|
|
|
1525
1803
|
#### Defined in
|
|
1526
1804
|
|
|
1527
|
-
[isNull.ts:4](https://github.com/daysnap/utils/blob/
|
|
1805
|
+
[isNull.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isNull.ts#L4)
|
|
1528
1806
|
|
|
1529
1807
|
___
|
|
1530
1808
|
|
|
@@ -1546,7 +1824,7 @@ val is number
|
|
|
1546
1824
|
|
|
1547
1825
|
#### Defined in
|
|
1548
1826
|
|
|
1549
|
-
[isNumber.ts:5](https://github.com/daysnap/utils/blob/
|
|
1827
|
+
[isNumber.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/isNumber.ts#L5)
|
|
1550
1828
|
|
|
1551
1829
|
___
|
|
1552
1830
|
|
|
@@ -1568,7 +1846,7 @@ val is Record<string, any\>
|
|
|
1568
1846
|
|
|
1569
1847
|
#### Defined in
|
|
1570
1848
|
|
|
1571
|
-
[isObject.ts:4](https://github.com/daysnap/utils/blob/
|
|
1849
|
+
[isObject.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isObject.ts#L4)
|
|
1572
1850
|
|
|
1573
1851
|
___
|
|
1574
1852
|
|
|
@@ -1590,7 +1868,7 @@ ___
|
|
|
1590
1868
|
|
|
1591
1869
|
#### Defined in
|
|
1592
1870
|
|
|
1593
|
-
[isPhone.ts:4](https://github.com/daysnap/utils/blob/
|
|
1871
|
+
[isPhone.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isPhone.ts#L4)
|
|
1594
1872
|
|
|
1595
1873
|
___
|
|
1596
1874
|
|
|
@@ -1618,7 +1896,7 @@ val is Promise<T\>
|
|
|
1618
1896
|
|
|
1619
1897
|
#### Defined in
|
|
1620
1898
|
|
|
1621
|
-
[isPromise.ts:4](https://github.com/daysnap/utils/blob/
|
|
1899
|
+
[isPromise.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isPromise.ts#L4)
|
|
1622
1900
|
|
|
1623
1901
|
___
|
|
1624
1902
|
|
|
@@ -1640,7 +1918,7 @@ val is RegExp
|
|
|
1640
1918
|
|
|
1641
1919
|
#### Defined in
|
|
1642
1920
|
|
|
1643
|
-
[isRegExp.ts:4](https://github.com/daysnap/utils/blob/
|
|
1921
|
+
[isRegExp.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isRegExp.ts#L4)
|
|
1644
1922
|
|
|
1645
1923
|
___
|
|
1646
1924
|
|
|
@@ -1662,7 +1940,7 @@ val is string
|
|
|
1662
1940
|
|
|
1663
1941
|
#### Defined in
|
|
1664
1942
|
|
|
1665
|
-
[isString.ts:4](https://github.com/daysnap/utils/blob/
|
|
1943
|
+
[isString.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isString.ts#L4)
|
|
1666
1944
|
|
|
1667
1945
|
___
|
|
1668
1946
|
|
|
@@ -1684,7 +1962,7 @@ ___
|
|
|
1684
1962
|
|
|
1685
1963
|
#### Defined in
|
|
1686
1964
|
|
|
1687
|
-
[isURL.ts:4](https://github.com/daysnap/utils/blob/
|
|
1965
|
+
[isURL.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isURL.ts#L4)
|
|
1688
1966
|
|
|
1689
1967
|
___
|
|
1690
1968
|
|
|
@@ -1706,7 +1984,7 @@ val is undefined
|
|
|
1706
1984
|
|
|
1707
1985
|
#### Defined in
|
|
1708
1986
|
|
|
1709
|
-
[isUndefined.ts:4](https://github.com/daysnap/utils/blob/
|
|
1987
|
+
[isUndefined.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isUndefined.ts#L4)
|
|
1710
1988
|
|
|
1711
1989
|
___
|
|
1712
1990
|
|
|
@@ -1722,7 +2000,7 @@ ___
|
|
|
1722
2000
|
|
|
1723
2001
|
#### Defined in
|
|
1724
2002
|
|
|
1725
|
-
[isWeChat.ts:4](https://github.com/daysnap/utils/blob/
|
|
2003
|
+
[isWeChat.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/isWeChat.ts#L4)
|
|
1726
2004
|
|
|
1727
2005
|
___
|
|
1728
2006
|
|
|
@@ -1739,7 +2017,7 @@ https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html
|
|
|
1739
2017
|
|
|
1740
2018
|
#### Defined in
|
|
1741
2019
|
|
|
1742
|
-
[isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/
|
|
2020
|
+
[isWeChatMiniProgram.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/isWeChatMiniProgram.ts#L5)
|
|
1743
2021
|
|
|
1744
2022
|
___
|
|
1745
2023
|
|
|
@@ -1759,7 +2037,7 @@ ___
|
|
|
1759
2037
|
|
|
1760
2038
|
#### Defined in
|
|
1761
2039
|
|
|
1762
|
-
[isWeChat.ts:12](https://github.com/daysnap/utils/blob/
|
|
2040
|
+
[isWeChat.ts:12](https://github.com/daysnap/utils/blob/8bac5a4/src/isWeChat.ts#L12)
|
|
1763
2041
|
|
|
1764
2042
|
___
|
|
1765
2043
|
|
|
@@ -1781,7 +2059,7 @@ val is Window
|
|
|
1781
2059
|
|
|
1782
2060
|
#### Defined in
|
|
1783
2061
|
|
|
1784
|
-
[isWindow.ts:5](https://github.com/daysnap/utils/blob/
|
|
2062
|
+
[isWindow.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/isWindow.ts#L5)
|
|
1785
2063
|
|
|
1786
2064
|
___
|
|
1787
2065
|
|
|
@@ -1804,7 +2082,7 @@ kebabCase('helloWorld') => hello-world
|
|
|
1804
2082
|
|
|
1805
2083
|
#### Defined in
|
|
1806
2084
|
|
|
1807
|
-
[kebabCase.ts:5](https://github.com/daysnap/utils/blob/
|
|
2085
|
+
[kebabCase.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/kebabCase.ts#L5)
|
|
1808
2086
|
|
|
1809
2087
|
___
|
|
1810
2088
|
|
|
@@ -1833,7 +2111,7 @@ list 生成器,快速生成数据
|
|
|
1833
2111
|
|
|
1834
2112
|
#### Defined in
|
|
1835
2113
|
|
|
1836
|
-
[listGenerator.ts:5](https://github.com/daysnap/utils/blob/
|
|
2114
|
+
[listGenerator.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/listGenerator.ts#L5)
|
|
1837
2115
|
|
|
1838
2116
|
___
|
|
1839
2117
|
|
|
@@ -1858,7 +2136,7 @@ ___
|
|
|
1858
2136
|
|
|
1859
2137
|
#### Defined in
|
|
1860
2138
|
|
|
1861
|
-
[mousewheel.ts:22](https://github.com/daysnap/utils/blob/
|
|
2139
|
+
[mousewheel.ts:22](https://github.com/daysnap/utils/blob/8bac5a4/src/mousewheel.ts#L22)
|
|
1862
2140
|
|
|
1863
2141
|
___
|
|
1864
2142
|
|
|
@@ -1880,7 +2158,7 @@ ___
|
|
|
1880
2158
|
|
|
1881
2159
|
#### Defined in
|
|
1882
2160
|
|
|
1883
|
-
[normalizePath.ts:4](https://github.com/daysnap/utils/blob/
|
|
2161
|
+
[normalizePath.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/normalizePath.ts#L4)
|
|
1884
2162
|
|
|
1885
2163
|
___
|
|
1886
2164
|
|
|
@@ -1910,7 +2188,7 @@ ___
|
|
|
1910
2188
|
|
|
1911
2189
|
#### Defined in
|
|
1912
2190
|
|
|
1913
|
-
[omit.ts:4](https://github.com/daysnap/utils/blob/
|
|
2191
|
+
[omit.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/omit.ts#L4)
|
|
1914
2192
|
|
|
1915
2193
|
___
|
|
1916
2194
|
|
|
@@ -1934,7 +2212,7 @@ ___
|
|
|
1934
2212
|
|
|
1935
2213
|
#### Defined in
|
|
1936
2214
|
|
|
1937
|
-
[padding.ts:7](https://github.com/daysnap/utils/blob/
|
|
2215
|
+
[padding.ts:7](https://github.com/daysnap/utils/blob/8bac5a4/src/padding.ts#L7)
|
|
1938
2216
|
|
|
1939
2217
|
___
|
|
1940
2218
|
|
|
@@ -1956,7 +2234,7 @@ ___
|
|
|
1956
2234
|
|
|
1957
2235
|
#### Defined in
|
|
1958
2236
|
|
|
1959
|
-
[parseDate.ts:4](https://github.com/daysnap/utils/blob/
|
|
2237
|
+
[parseDate.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/parseDate.ts#L4)
|
|
1960
2238
|
|
|
1961
2239
|
___
|
|
1962
2240
|
|
|
@@ -1979,7 +2257,7 @@ ___
|
|
|
1979
2257
|
|
|
1980
2258
|
#### Defined in
|
|
1981
2259
|
|
|
1982
|
-
[parseError.ts:8](https://github.com/daysnap/utils/blob/
|
|
2260
|
+
[parseError.ts:8](https://github.com/daysnap/utils/blob/8bac5a4/src/parseError.ts#L8)
|
|
1983
2261
|
|
|
1984
2262
|
___
|
|
1985
2263
|
|
|
@@ -2009,7 +2287,7 @@ parseObject('a.b.c', 1) => { a: { b: { c: 1 } } }
|
|
|
2009
2287
|
|
|
2010
2288
|
#### Defined in
|
|
2011
2289
|
|
|
2012
|
-
[parseObject.ts:5](https://github.com/daysnap/utils/blob/
|
|
2290
|
+
[parseObject.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/parseObject.ts#L5)
|
|
2013
2291
|
|
|
2014
2292
|
___
|
|
2015
2293
|
|
|
@@ -2038,7 +2316,7 @@ ___
|
|
|
2038
2316
|
|
|
2039
2317
|
#### Defined in
|
|
2040
2318
|
|
|
2041
|
-
[parsePath.ts:6](https://github.com/daysnap/utils/blob/
|
|
2319
|
+
[parsePath.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/parsePath.ts#L6)
|
|
2042
2320
|
|
|
2043
2321
|
___
|
|
2044
2322
|
|
|
@@ -2061,7 +2339,7 @@ ___
|
|
|
2061
2339
|
|
|
2062
2340
|
#### Defined in
|
|
2063
2341
|
|
|
2064
|
-
[parseQuery.ts:8](https://github.com/daysnap/utils/blob/
|
|
2342
|
+
[parseQuery.ts:8](https://github.com/daysnap/utils/blob/8bac5a4/src/parseQuery.ts#L8)
|
|
2065
2343
|
|
|
2066
2344
|
___
|
|
2067
2345
|
|
|
@@ -2084,7 +2362,7 @@ pascalCase('hello-world') => HelloWorld
|
|
|
2084
2362
|
|
|
2085
2363
|
#### Defined in
|
|
2086
2364
|
|
|
2087
|
-
[pascalCase.ts:8](https://github.com/daysnap/utils/blob/
|
|
2365
|
+
[pascalCase.ts:8](https://github.com/daysnap/utils/blob/8bac5a4/src/pascalCase.ts#L8)
|
|
2088
2366
|
|
|
2089
2367
|
___
|
|
2090
2368
|
|
|
@@ -2114,7 +2392,7 @@ ___
|
|
|
2114
2392
|
|
|
2115
2393
|
#### Defined in
|
|
2116
2394
|
|
|
2117
|
-
[pick.ts:4](https://github.com/daysnap/utils/blob/
|
|
2395
|
+
[pick.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/pick.ts#L4)
|
|
2118
2396
|
|
|
2119
2397
|
___
|
|
2120
2398
|
|
|
@@ -2137,7 +2415,7 @@ ___
|
|
|
2137
2415
|
|
|
2138
2416
|
#### Defined in
|
|
2139
2417
|
|
|
2140
|
-
[replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/
|
|
2418
|
+
[replaceCrlf.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/replaceCrlf.ts#L4)
|
|
2141
2419
|
|
|
2142
2420
|
___
|
|
2143
2421
|
|
|
@@ -2161,7 +2439,7 @@ ___
|
|
|
2161
2439
|
|
|
2162
2440
|
#### Defined in
|
|
2163
2441
|
|
|
2164
|
-
[requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/
|
|
2442
|
+
[requestFullScreen.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/requestFullScreen.ts#L6)
|
|
2165
2443
|
|
|
2166
2444
|
___
|
|
2167
2445
|
|
|
@@ -2187,7 +2465,7 @@ reserve(0, '--') => 0
|
|
|
2187
2465
|
|
|
2188
2466
|
#### Defined in
|
|
2189
2467
|
|
|
2190
|
-
[reserve.ts:8](https://github.com/daysnap/utils/blob/
|
|
2468
|
+
[reserve.ts:8](https://github.com/daysnap/utils/blob/8bac5a4/src/reserve.ts#L8)
|
|
2191
2469
|
|
|
2192
2470
|
___
|
|
2193
2471
|
|
|
@@ -2211,7 +2489,7 @@ ___
|
|
|
2211
2489
|
|
|
2212
2490
|
#### Defined in
|
|
2213
2491
|
|
|
2214
|
-
[rgbToHex.ts:4](https://github.com/daysnap/utils/blob/
|
|
2492
|
+
[rgbToHex.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/rgbToHex.ts#L4)
|
|
2215
2493
|
|
|
2216
2494
|
___
|
|
2217
2495
|
|
|
@@ -2234,7 +2512,7 @@ ___
|
|
|
2234
2512
|
|
|
2235
2513
|
#### Defined in
|
|
2236
2514
|
|
|
2237
|
-
[round.ts:6](https://github.com/daysnap/utils/blob/
|
|
2515
|
+
[round.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/round.ts#L6)
|
|
2238
2516
|
|
|
2239
2517
|
___
|
|
2240
2518
|
|
|
@@ -2250,7 +2528,7 @@ ___
|
|
|
2250
2528
|
|
|
2251
2529
|
#### Defined in
|
|
2252
2530
|
|
|
2253
|
-
[scrollToTop.ts:4](https://github.com/daysnap/utils/blob/
|
|
2531
|
+
[scrollToTop.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/scrollToTop.ts#L4)
|
|
2254
2532
|
|
|
2255
2533
|
___
|
|
2256
2534
|
|
|
@@ -2273,7 +2551,7 @@ ___
|
|
|
2273
2551
|
|
|
2274
2552
|
#### Defined in
|
|
2275
2553
|
|
|
2276
|
-
[sleep.ts:6](https://github.com/daysnap/utils/blob/
|
|
2554
|
+
[sleep.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/sleep.ts#L6)
|
|
2277
2555
|
|
|
2278
2556
|
___
|
|
2279
2557
|
|
|
@@ -2302,7 +2580,7 @@ ___
|
|
|
2302
2580
|
|
|
2303
2581
|
#### Defined in
|
|
2304
2582
|
|
|
2305
|
-
[splitArray.ts:4](https://github.com/daysnap/utils/blob/
|
|
2583
|
+
[splitArray.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/splitArray.ts#L4)
|
|
2306
2584
|
|
|
2307
2585
|
___
|
|
2308
2586
|
|
|
@@ -2325,7 +2603,7 @@ ___
|
|
|
2325
2603
|
|
|
2326
2604
|
#### Defined in
|
|
2327
2605
|
|
|
2328
|
-
[stringTrim.ts:6](https://github.com/daysnap/utils/blob/
|
|
2606
|
+
[stringTrim.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/stringTrim.ts#L6)
|
|
2329
2607
|
|
|
2330
2608
|
___
|
|
2331
2609
|
|
|
@@ -2347,7 +2625,7 @@ ___
|
|
|
2347
2625
|
|
|
2348
2626
|
#### Defined in
|
|
2349
2627
|
|
|
2350
|
-
[stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/
|
|
2628
|
+
[stringifyQuery.ts:7](https://github.com/daysnap/utils/blob/8bac5a4/src/stringifyQuery.ts#L7)
|
|
2351
2629
|
|
|
2352
2630
|
___
|
|
2353
2631
|
|
|
@@ -2390,7 +2668,7 @@ ___
|
|
|
2390
2668
|
|
|
2391
2669
|
#### Defined in
|
|
2392
2670
|
|
|
2393
|
-
[throttle.ts:5](https://github.com/daysnap/utils/blob/
|
|
2671
|
+
[throttle.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/throttle.ts#L5)
|
|
2394
2672
|
|
|
2395
2673
|
___
|
|
2396
2674
|
|
|
@@ -2412,7 +2690,7 @@ ___
|
|
|
2412
2690
|
|
|
2413
2691
|
#### Defined in
|
|
2414
2692
|
|
|
2415
|
-
[toCDB.ts:4](https://github.com/daysnap/utils/blob/
|
|
2693
|
+
[toCDB.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/toCDB.ts#L4)
|
|
2416
2694
|
|
|
2417
2695
|
___
|
|
2418
2696
|
|
|
@@ -2434,7 +2712,7 @@ ___
|
|
|
2434
2712
|
|
|
2435
2713
|
#### Defined in
|
|
2436
2714
|
|
|
2437
|
-
[toDBC.ts:4](https://github.com/daysnap/utils/blob/
|
|
2715
|
+
[toDBC.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/toDBC.ts#L4)
|
|
2438
2716
|
|
|
2439
2717
|
___
|
|
2440
2718
|
|
|
@@ -2458,4 +2736,4 @@ ___
|
|
|
2458
2736
|
|
|
2459
2737
|
#### Defined in
|
|
2460
2738
|
|
|
2461
|
-
[typeOf.ts:6](https://github.com/daysnap/utils/blob/
|
|
2739
|
+
[typeOf.ts:6](https://github.com/daysnap/utils/blob/8bac5a4/src/typeOf.ts#L6)
|