sqlite-view 0.2.0 is a JavaScript library for building SQLite database readers in web applications. It emerged as an abstraction of the popular sqlite-viewer application, providing an embeddable component that can load and display SQLite databases directly in the browser. The library uses sql.js (SQLite compiled to WebAssembly) under the hood. Current release cadence is infrequent; the last release was in 2021. It differentiates by offering a simple, no-framework-required widget with support for loading databases via URL or ByteArray, and includes client-side XSS protection for database contents. However, it does not escape table names, which could lead to SQL injection from malicious databases.
npm install sqlite-viewNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to embed a SQLite database viewer in an HTML page using a CDN import and load a sample database.
Do not load untrusted databases; sanitize table names manually if needed.
Use import statement instead of require().
Consider forking or migrating to an actively maintained alternative like sql.js-based custom component.
Use a proxy server or host the database on the same origin.
Change to `import SqliteView from 'sqlite-view'` and ensure package.json has type: module.
Use `import SqliteView from 'sqlite-view'` (default export) and ensure it is loaded as a module.
Serve the database file from the same origin or configure CORS headers.