JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 148
  • Score
    100M100P100Q119230F
  • License MIT

Lightweight SQLite-backed key-value store with atomic transactions, TTL, queue, and TypeScript client SDK.

Package Exports

  • @coderbuzz/kvs

Readme

KVS — @coderbuzz/kvs

Multi-backend key-value store for TypeScript. Embed directly in your app — zero HTTP deps. Supports SQLite (sync) and PostgreSQL (async).

Atomic transactions, TTL expiry, persistent queue with retries, real-time watch, and push-based listeners.

Installation

npm install @coderbuzz/kvs

Quick Start

import { KVStore, AsyncKVStore } from "@coderbuzz/kvs";

// Sync — SQLite (bun:sqlite)
const store = new KVStore("kv.db");
store.set(["greeting"], "hello world");
console.log(store.get(["greeting"])?.value);

// Async — SQLite or PostgreSQL (bun:sql)
const asyncStore = new AsyncKVStore("sqlite://kv.db");
await asyncStore.set(["greeting"], "hello world");
console.log(await asyncStore.get(["greeting"]));

// PostgreSQL
const pgStore = new AsyncKVStore("postgres://user:pass@localhost:5432/kvdb");
await pgStore.set(["key"], "value");

Documentation

Full API reference: DOCS.md

License

MIT © 2026 Indra Gunawan