@xylabs/storage 5.0.82 → 5.0.84

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/README.md CHANGED
@@ -102,6 +102,8 @@ The keys an array of keys.
102
102
  optional clear(): Promisable<void>;
103
103
  ```
104
104
 
105
+ Removes all entries from the store.
106
+
105
107
  ### Returns
106
108
 
107
109
  `Promisable`\<`void`\>
@@ -114,12 +116,16 @@ optional clear(): Promisable<void>;
114
116
  delete(key): Promisable<void>;
115
117
  ```
116
118
 
119
+ Deletes the entry with the given key.
120
+
117
121
  ### Parameters
118
122
 
119
123
  #### key
120
124
 
121
125
  `TKey`
122
126
 
127
+ The key of the entry to delete
128
+
123
129
  ### Returns
124
130
 
125
131
  `Promisable`\<`void`\>
@@ -132,16 +138,22 @@ delete(key): Promisable<void>;
132
138
  set(key, value): Promisable<void>;
133
139
  ```
134
140
 
141
+ Sets a value for the given key, creating or updating the entry.
142
+
135
143
  ### Parameters
136
144
 
137
145
  #### key
138
146
 
139
147
  `TKey`
140
148
 
149
+ The key to set
150
+
141
151
  #### value
142
152
 
143
153
  `TValue`
144
154
 
155
+ The value to store
156
+
145
157
  ### Returns
146
158
 
147
159
  `Promisable`\<`void`\>
@@ -17,8 +17,18 @@ export interface ReadonlyKeyValueStore<TValue, TKey = string> {
17
17
  * A read/write storage device.
18
18
  */
19
19
  export interface KeyValueStore<TValue, TKey = string> extends ReadonlyKeyValueStore<TValue, TKey> {
20
+ /** Removes all entries from the store. */
20
21
  clear?(): Promisable<void>;
22
+ /**
23
+ * Deletes the entry with the given key.
24
+ * @param key The key of the entry to delete
25
+ */
21
26
  delete(key: TKey): Promisable<void>;
27
+ /**
28
+ * Sets a value for the given key, creating or updating the entry.
29
+ * @param key The key to set
30
+ * @param value The value to store
31
+ */
22
32
  set(key: TKey, value: TValue): Promisable<void>;
23
33
  }
24
34
  //# sourceMappingURL=KeyValueStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueStore.d.ts","sourceRoot":"","sources":["../../src/KeyValueStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM;IAC1D;;;OAGG;IACH,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC9C;;OAEG;IACH,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC,CAAA;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,CAAE,SAAQ,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC;IAC/F,KAAK,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IAC1B,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;IACnC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;CAChD"}
1
+ {"version":3,"file":"KeyValueStore.d.ts","sourceRoot":"","sources":["../../src/KeyValueStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM;IAC1D;;;OAGG;IACH,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC9C;;OAEG;IACH,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC,CAAA;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,CAAE,SAAQ,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC;IAC/F,0CAA0C;IAC1C,KAAK,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IAC1B;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;IACnC;;;;OAIG;IACH,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;CAChD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/storage",
3
- "version": "5.0.82",
3
+ "version": "5.0.84",
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.82"
45
+ "@xylabs/promise": "~5.0.84"
46
46
  },
47
47
  "devDependencies": {
48
- "@xylabs/ts-scripts-yarn3": "~7.4.11",
49
- "@xylabs/tsconfig": "~7.4.11",
48
+ "@xylabs/ts-scripts-yarn3": "~7.4.13",
49
+ "@xylabs/tsconfig": "~7.4.13",
50
50
  "typescript": "~5.9.3"
51
51
  },
52
52
  "engines": {