Skip to content

smaltdbSmall. Alternate. Fast.

A fast alternative database for the browser, written in TypeScript.

smaltdbsmaltdb

Quick start ​

ts
import { open } from 'smaltdb';

const db = await open('app'); // engine runs in a worker, data lives in OPFS
await db.exec('CREATE TABLE IF NOT EXISTS todo(id INTEGER PRIMARY KEY, title TEXT NOT NULL, done INT DEFAULT 0)');
await db.exec('INSERT INTO todo(title) VALUES (?)', ['write docs']);
const rows = await db.query('SELECT id, title FROM todo WHERE done = 0');

MIT License