@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.
@@ -0,0 +1,92 @@
1
+ [@daysnap/utils](../README.md) / [Exports](../modules.md) / StorageManager
2
+
3
+ # Interface: StorageManager<T\>
4
+
5
+ ## Type parameters
6
+
7
+ | Name | Type |
8
+ | :------ | :------ |
9
+ | `T` | `any` |
10
+
11
+ ## Table of contents
12
+
13
+ ### Methods
14
+
15
+ - [getItem](StorageManager.md#getitem)
16
+ - [removeItem](StorageManager.md#removeitem)
17
+ - [setItem](StorageManager.md#setitem)
18
+ - [updateItem](StorageManager.md#updateitem)
19
+
20
+ ## Methods
21
+
22
+ ### getItem
23
+
24
+ ▸ **getItem**(`defaultVal?`): `T`
25
+
26
+ #### Parameters
27
+
28
+ | Name | Type |
29
+ | :------ | :------ |
30
+ | `defaultVal?` | `Partial`<`T`\> |
31
+
32
+ #### Returns
33
+
34
+ `T`
35
+
36
+ #### Defined in
37
+
38
+ [storage/factory.ts:3](https://github.com/daysnap/utils/blob/8bac5a4/src/storage/factory.ts#L3)
39
+
40
+ ___
41
+
42
+ ### removeItem
43
+
44
+ ▸ **removeItem**(): `void`
45
+
46
+ #### Returns
47
+
48
+ `void`
49
+
50
+ #### Defined in
51
+
52
+ [storage/factory.ts:4](https://github.com/daysnap/utils/blob/8bac5a4/src/storage/factory.ts#L4)
53
+
54
+ ___
55
+
56
+ ### setItem
57
+
58
+ ▸ **setItem**(`val`): `T`
59
+
60
+ #### Parameters
61
+
62
+ | Name | Type |
63
+ | :------ | :------ |
64
+ | `val` | `T` |
65
+
66
+ #### Returns
67
+
68
+ `T`
69
+
70
+ #### Defined in
71
+
72
+ [storage/factory.ts:2](https://github.com/daysnap/utils/blob/8bac5a4/src/storage/factory.ts#L2)
73
+
74
+ ___
75
+
76
+ ### updateItem
77
+
78
+ ▸ **updateItem**(`val`): `T`
79
+
80
+ #### Parameters
81
+
82
+ | Name | Type |
83
+ | :------ | :------ |
84
+ | `val` | `Partial`<`T`\> |
85
+
86
+ #### Returns
87
+
88
+ `T`
89
+
90
+ #### Defined in
91
+
92
+ [storage/factory.ts:5](https://github.com/daysnap/utils/blob/8bac5a4/src/storage/factory.ts#L5)
@@ -0,0 +1,118 @@
1
+ [@daysnap/utils](../README.md) / [Exports](../modules.md) / Trap
2
+
3
+ # Interface: Trap
4
+
5
+ 陷阱圈套
6
+ 主要用于缓存页面下、执行触发
7
+
8
+ ## Table of contents
9
+
10
+ ### Properties
11
+
12
+ - [clear](Trap.md#clear)
13
+ - [create](Trap.md#create)
14
+ - [delete](Trap.md#delete)
15
+ - [list](Trap.md#list)
16
+ - [trigger](Trap.md#trigger)
17
+
18
+ ## Properties
19
+
20
+ ### clear
21
+
22
+ • **clear**: () => `void`
23
+
24
+ #### Type declaration
25
+
26
+ ▸ (): `void`
27
+
28
+ ##### Returns
29
+
30
+ `void`
31
+
32
+ #### Defined in
33
+
34
+ [trap.ts:12](https://github.com/daysnap/utils/blob/8bac5a4/src/trap.ts#L12)
35
+
36
+ ___
37
+
38
+ ### create
39
+
40
+ • **create**: (`id`: `string`, `cb`: (...`args`: `any`[]) => `any`) => `void`
41
+
42
+ #### Type declaration
43
+
44
+ ▸ (`id`, `cb`): `void`
45
+
46
+ ##### Parameters
47
+
48
+ | Name | Type |
49
+ | :------ | :------ |
50
+ | `id` | `string` |
51
+ | `cb` | (...`args`: `any`[]) => `any` |
52
+
53
+ ##### Returns
54
+
55
+ `void`
56
+
57
+ #### Defined in
58
+
59
+ [trap.ts:10](https://github.com/daysnap/utils/blob/8bac5a4/src/trap.ts#L10)
60
+
61
+ ___
62
+
63
+ ### delete
64
+
65
+ • **delete**: (`id`: `string`) => `void`
66
+
67
+ #### Type declaration
68
+
69
+ ▸ (`id`): `void`
70
+
71
+ ##### Parameters
72
+
73
+ | Name | Type |
74
+ | :------ | :------ |
75
+ | `id` | `string` |
76
+
77
+ ##### Returns
78
+
79
+ `void`
80
+
81
+ #### Defined in
82
+
83
+ [trap.ts:11](https://github.com/daysnap/utils/blob/8bac5a4/src/trap.ts#L11)
84
+
85
+ ___
86
+
87
+ ### list
88
+
89
+ • **list**: `Record`<`string`, `any`\>
90
+
91
+ #### Defined in
92
+
93
+ [trap.ts:8](https://github.com/daysnap/utils/blob/8bac5a4/src/trap.ts#L8)
94
+
95
+ ___
96
+
97
+ ### trigger
98
+
99
+ • **trigger**: (`id`: `string`, `data?`: `any`) => `void`
100
+
101
+ #### Type declaration
102
+
103
+ ▸ (`id`, `data?`): `void`
104
+
105
+ ##### Parameters
106
+
107
+ | Name | Type |
108
+ | :------ | :------ |
109
+ | `id` | `string` |
110
+ | `data?` | `any` |
111
+
112
+ ##### Returns
113
+
114
+ `void`
115
+
116
+ #### Defined in
117
+
118
+ [trap.ts:9](https://github.com/daysnap/utils/blob/8bac5a4/src/trap.ts#L9)