@xylabs/storage 5.0.84 → 5.0.86

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.
Files changed (2) hide show
  1. package/README.md +31 -46
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -15,6 +15,8 @@
15
15
 
16
16
  Base functionality used throughout XY Labs TypeScript/JavaScript libraries
17
17
 
18
+
19
+
18
20
  ## Reference
19
21
 
20
22
  **@xylabs/storage**
@@ -23,8 +25,10 @@ Base functionality used throughout XY Labs TypeScript/JavaScript libraries
23
25
 
24
26
  ## Interfaces
25
27
 
26
- - [ReadonlyKeyValueStore](#interfaces/ReadonlyKeyValueStore)
27
- - [KeyValueStore](#interfaces/KeyValueStore)
28
+ | Interface | Description |
29
+ | ------ | ------ |
30
+ | [ReadonlyKeyValueStore](#interfaces/ReadonlyKeyValueStore) | A readonly storage device. |
31
+ | [KeyValueStore](#interfaces/KeyValueStore) | A read/write storage device. |
28
32
 
29
33
  ### interfaces
30
34
 
@@ -42,31 +46,26 @@ A read/write storage device.
42
46
 
43
47
  ## Type Parameters
44
48
 
45
- ### TValue
46
-
47
- `TValue`
48
-
49
- ### TKey
50
-
51
- `TKey` = `string`
49
+ | Type Parameter | Default type |
50
+ | ------ | ------ |
51
+ | `TValue` | - |
52
+ | `TKey` | `string` |
52
53
 
53
54
  ## Methods
54
55
 
55
56
  ### get()
56
57
 
57
58
  ```ts
58
- get(key): Promisable<TValue | undefined>;
59
+ get(key: TKey): Promisable<TValue | undefined>;
59
60
  ```
60
61
 
61
62
  Returns a promise that resolves to the value for the given key.
62
63
 
63
64
  ### Parameters
64
65
 
65
- #### key
66
-
67
- `TKey`
68
-
69
- The key to get the value for.
66
+ | Parameter | Type | Description |
67
+ | ------ | ------ | ------ |
68
+ | `key` | `TKey` | The key to get the value for. |
70
69
 
71
70
  ### Returns
72
71
 
@@ -113,18 +112,16 @@ Removes all entries from the store.
113
112
  ### delete()
114
113
 
115
114
  ```ts
116
- delete(key): Promisable<void>;
115
+ delete(key: TKey): Promisable<void>;
117
116
  ```
118
117
 
119
118
  Deletes the entry with the given key.
120
119
 
121
120
  ### Parameters
122
121
 
123
- #### key
124
-
125
- `TKey`
126
-
127
- The key of the entry to delete
122
+ | Parameter | Type | Description |
123
+ | ------ | ------ | ------ |
124
+ | `key` | `TKey` | The key of the entry to delete |
128
125
 
129
126
  ### Returns
130
127
 
@@ -135,24 +132,17 @@ The key of the entry to delete
135
132
  ### set()
136
133
 
137
134
  ```ts
138
- set(key, value): Promisable<void>;
135
+ set(key: TKey, value: TValue): Promisable<void>;
139
136
  ```
140
137
 
141
138
  Sets a value for the given key, creating or updating the entry.
142
139
 
143
140
  ### Parameters
144
141
 
145
- #### key
146
-
147
- `TKey`
148
-
149
- The key to set
150
-
151
- #### value
152
-
153
- `TValue`
154
-
155
- The value to store
142
+ | Parameter | Type | Description |
143
+ | ------ | ------ | ------ |
144
+ | `key` | `TKey` | The key to set |
145
+ | `value` | `TValue` | The value to store |
156
146
 
157
147
  ### Returns
158
148
 
@@ -172,31 +162,26 @@ A readonly storage device.
172
162
 
173
163
  ## Type Parameters
174
164
 
175
- ### TValue
176
-
177
- `TValue`
178
-
179
- ### TKey
180
-
181
- `TKey` = `string`
165
+ | Type Parameter | Default type |
166
+ | ------ | ------ |
167
+ | `TValue` | - |
168
+ | `TKey` | `string` |
182
169
 
183
170
  ## Methods
184
171
 
185
172
  ### get()
186
173
 
187
174
  ```ts
188
- get(key): Promisable<TValue | undefined>;
175
+ get(key: TKey): Promisable<TValue | undefined>;
189
176
  ```
190
177
 
191
178
  Returns a promise that resolves to the value for the given key.
192
179
 
193
180
  ### Parameters
194
181
 
195
- #### key
196
-
197
- `TKey`
198
-
199
- The key to get the value for.
182
+ | Parameter | Type | Description |
183
+ | ------ | ------ | ------ |
184
+ | `key` | `TKey` | The key to get the value for. |
200
185
 
201
186
  ### Returns
202
187
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/storage",
3
- "version": "5.0.84",
3
+ "version": "5.0.86",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "hex",
@@ -42,11 +42,11 @@
42
42
  "!**/*.test.*"
43
43
  ],
44
44
  "dependencies": {
45
- "@xylabs/promise": "~5.0.84"
45
+ "@xylabs/promise": "~5.0.86"
46
46
  },
47
47
  "devDependencies": {
48
- "@xylabs/ts-scripts-yarn3": "~7.4.13",
49
- "@xylabs/tsconfig": "~7.4.13",
48
+ "@xylabs/ts-scripts-yarn3": "~7.4.16",
49
+ "@xylabs/tsconfig": "~7.4.16",
50
50
  "typescript": "~5.9.3"
51
51
  },
52
52
  "engines": {