bun-kv

1.0.1 • Public • Published

bun-kv

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

bun add bun-kv

Sample usage with TypeScript:

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

Package Sidebar

Install

npm i bun-kv

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

6.56 kB

Total Files

8

Last publish

Collaborators

  • zmeu213