Skip to content

Commit 8fda13e

Browse files
committed
build: version 0.0.8
1 parent f4830c9 commit 8fda13e

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ npm install kv-storage
2121
```
2222
CDN (browser)
2323
```javascript
24-
<script src="https://cdn.jsdelivr.net/npm/kv-storage@0.0.7/dist/umd/kv-storage.js"></script>
24+
<script src="https://cdn.jsdelivr.net/npm/kv-storage@0.0.8/dist/umd/kv-storage.js"></script>
2525
```
2626

2727
## Initialization
@@ -36,7 +36,7 @@ const {KVStorage} = require('kv-storage')
3636
import {KVStorage} from 'kv-storage'
3737

3838
//Deno import style
39-
import {KVStorage} from 'npm:kv-storage@0.0.7'
39+
import {KVStorage} from 'npm:kv-storage@0.0.8'
4040

4141
//Node, Browser, Deno & Bun Initialization
4242
const db = await KVStorage({
@@ -53,7 +53,7 @@ const db = await KVStorage({
5353
```
5454
CDN
5555
```javascript
56-
//Browser using CDN
56+
//Browser initialization if using CDN
5757

5858
const db = await kvstorage.KVStorage({
5959
runtime:'browser',
@@ -99,7 +99,7 @@ void async function main() {
9999
}()
100100
```
101101
```javascript
102-
<script src="https://cdn.jsdelivr.net/npm/kv-storage@0.0.7/dist/umd/kv-storage.js"></script>
102+
<script src="https://cdn.jsdelivr.net/npm/kv-storage@0.0.8/dist/umd/kv-storage.js"></script>
103103
<script>
104104
//Browser using CDN example
105105

@@ -121,7 +121,7 @@ void async function main() {
121121
```javascript
122122
<script type="module">
123123
//Browser ES Modules example
124-
import {KVStorage} from 'https://cdn.jsdelivr.net/npm/kv-storage@0.0.7/dist/mjs/kv-storage.js'
124+
import {KVStorage} from 'https://cdn.jsdelivr.net/npm/kv-storage@0.0.8/dist/mjs/kv-storage.js'
125125

126126
void async function main() {
127127
const db = await KVStorage({
@@ -139,7 +139,7 @@ void async function main() {
139139
```
140140
```javascript
141141
//Deno example
142-
import {KVStorage} from 'npm:kv-storage@0.0.7'
142+
import {KVStorage} from 'npm:kv-storage@0.0.8'
143143

144144
void async function main() {
145145
const db = await KVStorage({
@@ -189,9 +189,9 @@ export default {
189189

190190
```javascript
191191
await init({
192-
runtime?:string,
193-
storageName?:string,
194-
databaseBinding?:any
192+
runtime,
193+
storageName,
194+
databaseBinding
195195
})
196196
```
197197
```
@@ -200,22 +200,22 @@ storageName = Alphanumeric storage name
200200
databaseBinding = Cloudflare only D1 database binding env
201201
```
202202
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`
205205
- [x] `browser` use IndexedDB
206-
- [x] `bun`
206+
- [x] `bun` use file storage
207207
- [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)
208208

209209
### Write key-value pairs
210210

211211
```javascript
212-
await put(key:string,value:string)
212+
await put(key,value)
213213
```
214214
The put() method returns a Promise that you should await on to verify a successful update, resolve to `true` or `false`
215215
### Read key-value pairs
216216

217217
```javascript
218-
await get(key:string)
218+
await get(key)
219219
```
220220
The get() method returns a promise you can await on to get the value, resolve to the value or `false`
221221

@@ -226,24 +226,24 @@ await list()
226226
```
227227
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:
228228
* keys = Array of keys
229-
* complete = True if operation complete
229+
* complete = true if operation complete
230230

231231
### Delete key-value pairs
232232

233233
```javascript
234-
await delete(key:string)
234+
await delete(key)
235235
```
236236

237237
To delete a key-value pair, call the delete() method, resolve to `true` or `false`
238238

239239
### Has key-value pairs
240240

241241
```javascript
242-
await has(key:string)
242+
await has(key)
243243
```
244244

245245
To check for the existence of a key, resolve to `true` or `false`
246246

247247
## License
248248

249-
MIT
249+
[MIT](https://github.com/nuzulul/kv-storage/blob/main/LICENSE)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kv-storage",
3-
"version": "0.0.7",
3+
"version": "0.0.8",
44
"description": "Create data storage that uses a simple key-value method for Node, Browser, Deno, Bun, Cloudflare Workers",
55
"main": "dist/cjs/kv-storage.js",
66
"module": "dist/mjs/kv-storage.js",

0 commit comments

Comments
 (0)