SQLite Wasm wrapped as an ES Module with multiple ciphers support. Version 2.2.4 (stable) allows you to use SQLite with encryption (AES, ChaCha20, etc.) in Node.js and browsers via WebAssembly. It provides ESM imports only, no CommonJS. Key differentiator vs raw SQLite Wasm: built-in cipher support, OPFS (Origin Private FileSystem) integration, TypeScript types, and no build tool required. Published monthly.
npm install sqlite-wasm-cipherNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize SQLite with ciphers, create an in-memory database, execute SQL, and iterate over results.
Use 'import' syntax or set type: 'module' in package.json; for CommonJS, use dynamic import: const initSqlite = (await import('sqlite-wasm-cipher')).default;Change import to default async function call: const db = await initSqlite(...);
Always provide locateFile: file => '/path/to/' + file in init options.
Use non-OPFS mode or fallback to memory/IDBFS in non-supporting environments.
Use the default main export which includes all ciphers. For custom, refer to npm package variants.
Switch to ESM: set type:'module' in package.json and use import, or use dynamic import: const mod = await import('sqlite-wasm-cipher');Use: import initSqlite from 'sqlite-wasm-cipher'; or use default from dynamic import.
Await initSqlite() and use the returned object, e.g.: const sqlite3 = await initSqlite(...); then sqlite3.oo1.DB.
Ensure file path is correct or use ':memory:' for testing.
No dependency data recorded yet.