UNPKG

sqlocal

Version:

SQLocal makes it easy to run SQLite3 in the browser, backed by the origin private file system.

14 lines (10 loc) 365 B
import { SQLiteOpfsDriver } from './drivers/sqlite-opfs-driver.js'; import { SQLocalProcessor } from './processor.js'; const driver = new SQLiteOpfsDriver(); const processor = new SQLocalProcessor(driver); self.onmessage = (message) => { processor.postMessage(message); }; processor.onmessage = (message, transfer) => { self.postMessage(message, transfer); };