A lightweight MongoDB-like JSON document storage system backed by SQLite. Version 1.1.0 requires Node.js >=22. Provides familiar CRUD operations (insertOne, find, updateOne, deleteOne) on collections stored as SQLite tables. Supports rich queries with $in, $regex, aggregation ($match/$group), count, distinct. Differentiators: zero external dependencies beyond SQLite, in-memory or persistent options, direct raw SQL access. Ideal for small projects, edge deployments, or when avoiding a full MongoDB server.
npm install sqlite-docstoreNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes an in-memory database, creates a collection, inserts a document, queries it, and cleans up.
Store the returned object: const db = sqliteDocstore.init();
Call db.createCollection(name) before any insert/find operation.
Use .insertedId for the single insert ID, .insertedCount for multiple inserts.
Use ESM imports and upgrade Node.js to v22+.
Reuse the returned object or implement a singleton pattern.
import { sqliteDocstore } from 'sqlite-docstore'Call db.createCollection('users') before using the collectionSwitch to ESM imports or use dynamic import()
No dependency data recorded yet.