A minimal, no-frills JSON key-value storage engine for Node.js, version 2.0.0. It provides synchronous and asynchronous writes, optional sync-on-write, and customizable JSON serialization. Unlike full-fledged databases, Simple JSONdb stores the entire data in a single JSON file, making it ideal for small projects, prototypes, or configurations. Supports Node >=10.0, ships TypeScript definitions, and has 100% test coverage. Releases are infrequent, with v2 being the current stable.
npm install simple-json-dbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic CRUD operations: set, get, has, delete, JSON access, and sync.
Use import JSONdb from 'simple-json-db' or CommonJS require('simple-json-db').default.Use new JSONdb(path, options) as documented.
Use db.JSON(newObject) to replace the entire store, or db.set(key, value) for individual keys.
Always use string keys.
Set syncOnWrite: true in options to auto-sync after each modification.
Always read current data first (get JSON), merge, then write back.
Use const JSONdb = require('simple-json-db').defaultUse import JSONdb from 'simple-json-db'
Ensure the directory exists before creating the db instance.
Use db.JSON() with parentheses. Ensure you imported JSONdb correctly.
No dependency data recorded yet.