https://github.com/redraskal/bun-kv
A simple KV store using Bun's SQLite module.
https://github.com/redraskal/bun-kv
bun kv sqlite typescript
Last synced: 2 months ago
JSON representation
A simple KV store using Bun's SQLite module.
- Host: GitHub
- URL: https://github.com/redraskal/bun-kv
- Owner: redraskal
- License: mit
- Created: 2023-07-17T23:53:27.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-18T00:51:45.000Z (almost 3 years ago)
- Last Synced: 2023-07-18T01:45:41.123Z (almost 3 years ago)
- Topics: bun, kv, sqlite, typescript
- Language: TypeScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bun-kv
A simple KV store using Bun's [SQLite](https://bun.sh/docs/api/sqlite) module.
```bash
bun i redraskal/bun-kv#main
```
```ts
import KV from "bun-kv";
const database = new Database("bun.sqlite");
const KV = new KV(database);
KV.set("banana", "bread");
console.log(KV.get("banana")); // "bread"
KV.remove("banana");
```
This project was created using `bun init` in bun v0.6.15. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.