# bun-kv

> Bun simple key-value storage with SQLite

Latest version **1.0.1** (published 2023-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install bun-kv
pnpm add bun-kv
yarn add bun-kv
bun add bun-kv
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-08-28 |
| First published | 2023-08-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Kirill Chuprov |
| Maintainers | zmeu213 |
| Keywords | bun, typescript, plugin, key-value, kv, sqlite, storage, database |

## Links

- npm: https://www.npmjs.com/package/bun-kv
- Repository: https://github.com/kirill-dev-pro/bun-kv
- Homepage: https://github.com/kirill-dev-pro/bun-kv#readme
- Issues: https://github.com/kirill-dev-pro/bun-kv/issues
- npm.io page: https://npm.io/package/bun-kv

## Alternatives

- [@libsql/sqlite3](https://npm.io/package/@libsql/sqlite3.md) — 39.8K weekly downloads
- [@fortemi/core](https://npm.io/package/@fortemi/core.md) — 461 weekly downloads
- [cdb-converter](https://npm.io/package/cdb-converter.md) — 341 weekly downloads
- [@uplo/adapter-prisma](https://npm.io/package/@uplo/adapter-prisma.md) — 75 weekly downloads
- [typeorm-aios](https://npm.io/package/typeorm-aios.md) — 30 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2023-08-28
- 1.0.0 — 2023-08-27
- 0.0.4 — 2023-08-22
- 0.0.3 — 2023-08-22
- 0.0.2 — 2023-08-22
- 0.0.1 — 2023-08-22

## README

# bun-kv

A simple key-value store with SQLite that use `bun:sqlite`. No dependencies.

```bash
bun add bun-kv
```

### Sample usage with TypeScript:

```ts
import { KV } from 'bun-kv'

type Item = {
  id: string
  created_at: number
}

const items = new KV<Item>('items.sqlite')

items.set('foo', { created_at: Date.now(), id: 'foo' })

const foo = items.get('foo')
      ^? { created_at: number, id: string } | undefined
```

### License

MIT

---
_Source: https://npm.io/package/bun-kv · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
