Skip to content

Commit

Permalink
bump version and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
good-lly committed Dec 9, 2023
1 parent d4e3382 commit bd84592
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ Check out [wrangler.toml from examples](https://github.com/good-lly/lowstorage/b
## API

**collection(colName)**

- **Input**: A string representing the name of the collection.
- **Behavior**: Creates or accesses a collection with the given name.
- **Returns**: An instance of the Collection class corresponding to the specified collection name.

- **insert(doc)**

- **Input**: A single object or an array of objects.
Expand Down Expand Up @@ -129,6 +135,11 @@ Check out [wrangler.toml from examples](https://github.com/good-lly/lowstorage/b
- **Behavior**: Counts the number of documents that match the query. If no query is provided, it counts all documents in the collection.
- **Returns**: A promise that resolves to the count of matching documents.

**listCollections()**

- **Behavior**: Lists all collections stored in the Cloudflare R2 bucket associated with the lowstorage instance. (All files ending with .json)
- **Returns**: A promise that resolves to an array of collection names.

## Examples

Check out [dummy examples](https://github.com/good-lly/lowstorage/tree/master/examples)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lowstorage",
"version": "0.0.3",
"version": "0.0.4",
"description": "Zero-dependency, simple pseudo-database on Cloudflare R2, inspired by lowdb.",
"keywords": [
"storage",
Expand Down

0 comments on commit bd84592

Please sign in to comment.