Version 2.2.0 — one script tag, no build step.
<script src="https://prod-orm.io/cdn/prorm.min.js"></script>
const db = await prorm.openBrowserDatabase({ database: 'notes' });
const Note = db.define('Note', { title: prorm.DataTypes.STRING });
await db.sync();
await Note.create({ title: 'Hello' });
await Note.findAll({ where: { title: { like: 'H%' } } });
A real SQLite database in the page: SQLite compiled to WebAssembly where Web
SQL is gone, which is Chrome and Firefox. localStorage,
sessionStorage, cookies and adapters for PouchDB and RxDB come with
it.
| File | Format | Size |
|---|---|---|
prorm-2.2.0.js | script tag (IIFE) | 1403.8 KiB |
prorm-2.2.0.min.js | script tag (IIFE) | 548.3 KiB |
prorm-2.2.0.esm.js | ES module | 1316.8 KiB |
prorm-2.2.0.esm.min.js | ES module | 547.8 KiB |
Unversioned aliases follow the latest release:
prorm.js, prorm.min.js, prorm.esm.js,
prorm.esm.min.js. Pin a version for production;
manifest.json lists what is published.
Served from /cdn/sqlite/ and fetched the first time you open a database — a page that never opens one downloads none of it.