SQLite compiled to WebAssembly via Emscripten, version 1.1.4. Provides a synchronous-like API for running SQL queries in both browser and Node.js environments with minimal overhead. Unlike the more common sql.js, sql-wasm requires asynchronous initialization by fetching the .wasm file from network or filesystem, and omits Web Worker support. It ships TypeScript types and aims to be a drop-in replacement with a nearly identical API. Release cadence is low; primarily a port of sql.js with active maintenance.
npm install sql-wasmNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows asynchronous initialization, creating a database, running SQL, and querying.
Use async/await or .then() to obtain the sql instance before creating databases.
Ensure the .wasm file is accessible at the expected URL or provide a custom wasmUrl.
For Web Worker usage, use sql.js instead.
Ensure the factory function is awaited: const sql = await createSqlWasm();
Set correct wasmUrl (e.g., in browser use a path like '/sqlite3.wasm' or a CDN).
No dependency data recorded yet.