@xylabs/storage 5.0.95 → 5.0.96

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 +82 -83
  2. package/package.json +4 -7
package/README.md CHANGED
@@ -1,38 +1,52 @@
1
1
  # @xylabs/storage
2
2
 
3
- [![logo][]](https://xylabs.com)
3
+ [![npm][npm-badge]][npm-link]
4
+ [![license][license-badge]][license-link]
4
5
 
5
- [![main-build][]][main-build-link]
6
- [![npm-badge][]][npm-link]
7
- [![npm-downloads-badge][]][npm-link]
8
- [![jsdelivr-badge][]][jsdelivr-link]
9
- [![npm-license-badge][]](LICENSE)
10
- [![codacy-badge][]][codacy-link]
11
- [![codeclimate-badge][]][codeclimate-link]
12
- [![snyk-badge][]][snyk-link]
13
- [![socket-badge][]][socket-link]
6
+ > Base functionality used throughout XY Labs TypeScript/JavaScript libraries
14
7
 
8
+ ## Install
15
9
 
16
- Base functionality used throughout XY Labs TypeScript/JavaScript libraries
10
+ Using npm:
17
11
 
12
+ ```sh
13
+ npm install {{name}}
14
+ ```
18
15
 
16
+ Using yarn:
19
17
 
20
- ## Reference
18
+ ```sh
19
+ yarn add {{name}}
20
+ ```
21
21
 
22
- **@xylabs/storage**
22
+ Using pnpm:
23
23
 
24
- ***
24
+ ```sh
25
+ pnpm add {{name}}
26
+ ```
27
+
28
+ Using bun:
29
+
30
+ ```sh
31
+ bun add {{name}}
32
+ ```
33
+
34
+
35
+ ## License
25
36
 
26
- ## Interfaces
37
+ See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
27
38
 
28
- | Interface | Description |
29
- | ------ | ------ |
30
- | [ReadonlyKeyValueStore](#interfaces/ReadonlyKeyValueStore) | A readonly storage device. |
31
- | [KeyValueStore](#interfaces/KeyValueStore) | A read/write storage device. |
39
+ ## Reference
40
+
41
+ ### packages
42
+
43
+ ### storage
32
44
 
33
- ### interfaces
45
+ ### .temp-typedoc
34
46
 
35
- ### <a id="KeyValueStore"></a>KeyValueStore
47
+ ### interfaces
48
+
49
+ ### <a id="KeyValueStore"></a>KeyValueStore
36
50
 
37
51
  [**@xylabs/storage**](#../README)
38
52
 
@@ -46,26 +60,31 @@ A read/write storage device.
46
60
 
47
61
  ## Type Parameters
48
62
 
49
- | Type Parameter | Default type |
50
- | ------ | ------ |
51
- | `TValue` | - |
52
- | `TKey` | `string` |
63
+ ### TValue
64
+
65
+ `TValue`
66
+
67
+ ### TKey
68
+
69
+ `TKey` = `string`
53
70
 
54
71
  ## Methods
55
72
 
56
73
  ### get()
57
74
 
58
75
  ```ts
59
- get(key: TKey): Promisable<TValue | undefined>;
76
+ get(key): Promisable<TValue | undefined>;
60
77
  ```
61
78
 
62
79
  Returns a promise that resolves to the value for the given key.
63
80
 
64
81
  ### Parameters
65
82
 
66
- | Parameter | Type | Description |
67
- | ------ | ------ | ------ |
68
- | `key` | `TKey` | The key to get the value for. |
83
+ #### key
84
+
85
+ `TKey`
86
+
87
+ The key to get the value for.
69
88
 
70
89
  ### Returns
71
90
 
@@ -112,16 +131,18 @@ Removes all entries from the store.
112
131
  ### delete()
113
132
 
114
133
  ```ts
115
- delete(key: TKey): Promisable<void>;
134
+ delete(key): Promisable<void>;
116
135
  ```
117
136
 
118
137
  Deletes the entry with the given key.
119
138
 
120
139
  ### Parameters
121
140
 
122
- | Parameter | Type | Description |
123
- | ------ | ------ | ------ |
124
- | `key` | `TKey` | The key of the entry to delete |
141
+ #### key
142
+
143
+ `TKey`
144
+
145
+ The key of the entry to delete
125
146
 
126
147
  ### Returns
127
148
 
@@ -132,23 +153,30 @@ Deletes the entry with the given key.
132
153
  ### set()
133
154
 
134
155
  ```ts
135
- set(key: TKey, value: TValue): Promisable<void>;
156
+ set(key, value): Promisable<void>;
136
157
  ```
137
158
 
138
159
  Sets a value for the given key, creating or updating the entry.
139
160
 
140
161
  ### Parameters
141
162
 
142
- | Parameter | Type | Description |
143
- | ------ | ------ | ------ |
144
- | `key` | `TKey` | The key to set |
145
- | `value` | `TValue` | The value to store |
163
+ #### key
164
+
165
+ `TKey`
166
+
167
+ The key to set
168
+
169
+ #### value
170
+
171
+ `TValue`
172
+
173
+ The value to store
146
174
 
147
175
  ### Returns
148
176
 
149
177
  `Promisable`\<`void`\>
150
178
 
151
- ### <a id="ReadonlyKeyValueStore"></a>ReadonlyKeyValueStore
179
+ ### <a id="ReadonlyKeyValueStore"></a>ReadonlyKeyValueStore
152
180
 
153
181
  [**@xylabs/storage**](#../README)
154
182
 
@@ -162,26 +190,31 @@ A readonly storage device.
162
190
 
163
191
  ## Type Parameters
164
192
 
165
- | Type Parameter | Default type |
166
- | ------ | ------ |
167
- | `TValue` | - |
168
- | `TKey` | `string` |
193
+ ### TValue
194
+
195
+ `TValue`
196
+
197
+ ### TKey
198
+
199
+ `TKey` = `string`
169
200
 
170
201
  ## Methods
171
202
 
172
203
  ### get()
173
204
 
174
205
  ```ts
175
- get(key: TKey): Promisable<TValue | undefined>;
206
+ get(key): Promisable<TValue | undefined>;
176
207
  ```
177
208
 
178
209
  Returns a promise that resolves to the value for the given key.
179
210
 
180
211
  ### Parameters
181
212
 
182
- | Parameter | Type | Description |
183
- | ------ | ------ | ------ |
184
- | `key` | `TKey` | The key to get the value for. |
213
+ #### key
214
+
215
+ `TKey`
216
+
217
+ The key to get the value for.
185
218
 
186
219
  ### Returns
187
220
 
@@ -202,41 +235,7 @@ The keys an array of keys.
202
235
  `Promisable`\<`TKey`[]\>
203
236
 
204
237
 
205
- Part of [sdk-js](https://www.npmjs.com/package/@xyo-network/sdk-js)
206
-
207
- ## Maintainers
208
-
209
- - [Arie Trouw](https://github.com/arietrouw) ([arietrouw.com](https://arietrouw.com))
210
- - [Matt Jones](https://github.com/jonesmac)
211
- - [Joel Carter](https://github.com/JoelBCarter)
212
- - [Jordan Trouw](https://github.com/jordantrouw)
213
-
214
- ## License
215
-
216
- > See the [LICENSE](LICENSE) file for license details
217
-
218
- ## Credits
219
-
220
- [Made with 🔥 and ❄️ by XYLabs](https://xylabs.com)
221
-
222
- [logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
223
-
224
- [main-build]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml/badge.svg
225
- [main-build-link]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml
226
238
  [npm-badge]: https://img.shields.io/npm/v/@xylabs/storage.svg
227
239
  [npm-link]: https://www.npmjs.com/package/@xylabs/storage
228
- [codacy-badge]: https://app.codacy.com/project/badge/Grade/c8e15e14f37741c18cfb47ac7245c698
229
- [codacy-link]: https://www.codacy.com/gh/xylabs/sdk-js/dashboard?utm_source=github.com&utm_medium=referral&utm_content=xylabs/sdk-js&utm_campaign=Badge_Grade
230
- [codeclimate-badge]: https://api.codeclimate.com/v1/badges/c5eb068f806f0b047ea7/maintainability
231
- [codeclimate-link]: https://codeclimate.com/github/xylabs/sdk-js/maintainability
232
- [snyk-badge]: https://snyk.io/test/github/xylabs/sdk-js/badge.svg?targetFile=package.json
233
- [snyk-link]: https://snyk.io/test/github/xylabs/sdk-js?targetFile=package.json
234
-
235
- [npm-downloads-badge]: https://img.shields.io/npm/dw/@xylabs/storage
236
- [npm-license-badge]: https://img.shields.io/npm/l/@xylabs/storage
237
-
238
- [jsdelivr-badge]: https://data.jsdelivr.com/v1/package/npm/@xylabs/storage/badge
239
- [jsdelivr-link]: https://www.jsdelivr.com/package/npm/@xylabs/storage
240
-
241
- [socket-badge]: https://socket.dev/api/badge/npm/package/@xylabs/storage
242
- [socket-link]: https://socket.dev/npm/package/@xylabs/storage
240
+ [license-badge]: https://img.shields.io/npm/l/@xylabs/storage.svg
241
+ [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/storage",
3
- "version": "5.0.95",
3
+ "version": "5.0.96",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "hex",
@@ -29,12 +29,10 @@
29
29
  "exports": {
30
30
  ".": {
31
31
  "types": "./dist/neutral/index.d.ts",
32
- "import": "./dist/neutral/index.mjs",
33
32
  "default": "./dist/neutral/index.mjs"
34
33
  },
35
34
  "./package.json": "./package.json"
36
35
  },
37
- "types": "./dist/neutral/index.d.ts",
38
36
  "files": [
39
37
  "dist",
40
38
  "!**/*.bench.*",
@@ -43,12 +41,11 @@
43
41
  "README.md"
44
42
  ],
45
43
  "dependencies": {
46
- "@xylabs/promise": "~5.0.95"
44
+ "@xylabs/promise": "~5.0.96"
47
45
  },
48
46
  "devDependencies": {
49
- "@xylabs/ts-scripts-common": "~7.8.4",
50
- "@xylabs/ts-scripts-pnpm": "~7.8.4",
51
- "@xylabs/tsconfig": "~7.8.4",
47
+ "@xylabs/toolchain": "~7.10.4",
48
+ "@xylabs/tsconfig": "~7.10.4",
52
49
  "typescript": "^5"
53
50
  },
54
51
  "engines": {