You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -200,22 +200,22 @@ storageName = Alphanumeric storage name
200
200
databaseBinding = Cloudflare only D1 database binding env
201
201
```
202
202
Supported runtime :
203
-
-[x]`node`
204
-
-[x]`deno` need `--allow-read --allow-write`
203
+
-[x]`node` use file storage
204
+
-[x]`deno`use file storage need `--allow-read --allow-write`
205
205
-[x]`browser` use IndexedDB
206
-
-[x]`bun`
206
+
-[x]`bun` use file storage
207
207
-[x]`cloudflare` workers use D1 Database [docs](https://developers.cloudflare.com/d1/get-started/#4-bind-your-worker-to-your-d1-database) example [wrangler.toml](https://github.com/nuzulul/kv-storage/blob/main/wrangler.toml)
208
208
209
209
### Write key-value pairs
210
210
211
211
```javascript
212
-
awaitput(key:string,value:string)
212
+
awaitput(key,value)
213
213
```
214
214
The put() method returns a Promise that you should await on to verify a successful update, resolve to `true` or `false`
215
215
### Read key-value pairs
216
216
217
217
```javascript
218
-
awaitget(key:string)
218
+
awaitget(key)
219
219
```
220
220
The get() method returns a promise you can await on to get the value, resolve to the value or `false`
221
221
@@ -226,24 +226,24 @@ await list()
226
226
```
227
227
Use a list operation to view all the keys that live in a given storage, return a promise which resolves with an object consist of:
228
228
* keys = Array of keys
229
-
* complete = True if operation complete
229
+
* complete = true if operation complete
230
230
231
231
### Delete key-value pairs
232
232
233
233
```javascript
234
-
awaitdelete(key:string)
234
+
awaitdelete(key)
235
235
```
236
236
237
237
To delete a key-value pair, call the delete() method, resolve to `true` or `false`
238
238
239
239
### Has key-value pairs
240
240
241
241
```javascript
242
-
awaithas(key:string)
242
+
awaithas(key)
243
243
```
244
244
245
245
To check for the existence of a key, resolve to `true` or `false`
0 commit comments