Skip to content

Commit cb54e81

Browse files
authored
Merge pull request #2 from good-lly/dev
remove examples from package and minor updates in readme
2 parents 6af7aa7 + a90a240 commit cb54e81

File tree

5 files changed

+23
-6
lines changed

5 files changed

+23
-6
lines changed

.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
examples

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import lowstorage from 'lowstorage';
1616
const usersCol = await lowstorage(env, 'MY_TESTING_BUCKET').collection('users');
1717

1818
// Add new user
19+
// you can provide _id or it will be generated as crypto.randomUUID(); -> https://developers.cloudflare.com/workers/runtime-apis/web-crypto/
1920
const newUser = await usersCol.insert({
2021
name: 'Kevin',
2122
gender: 'whatever',
@@ -51,7 +52,7 @@ But after all, it seems quite slow ...
5152

5253
## API
5354

54-
- insert (object {} or array [] of objects) - return array
55+
- insert (object {} or array [] of objects) - return array - check #Limitations
5556

5657
- find(query object eg. {\_id: id}) - return array of objects
5758
- findOne - same as find, but return only array of one object, equivalent to the db.collection.find(query)

examples/package-lock.json

+17-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"wrangler": "^3.0.0"
1212
},
1313
"dependencies": {
14-
"hono": "^3.10.2"
14+
"hono": "^3.10.2",
15+
"lowstorage": "^0.0.1"
1516
}
1617
}

examples/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
import lowstorage from '../../src/lowstorage.js';
3+
import lowstorage from 'lowstorage';
44
import { Hono } from 'hono';
55
const app = new Hono();
66

0 commit comments

Comments
 (0)