A lightweight, zero-dependency Node.js library (version 1.0.0, released 2023) for querying and manipulating JSON data structures using an ORM-like interface. Provides CRUD operations with both synchronous and asynchronous APIs, querying by key-value pairs with support for wildcards and regular expressions, dot-notation path access, and logical operators. Designed for simple JSON file persistence without a full database. Note: The package has only one version (1.0.0) and appears to be in an early stage, with minimal community adoption and infrequent updates.
npm install json-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates synchronous and asynchronous querying, path-based access, and retrieval of objects from paths.
Use the exact query format: { keyName: 'property', value: 'desiredValue' }.Wrap the update object in an array: `db.updateSync('path', [{ keyName: 'field', value: 'new' }])`.After modifying data, call `db.saveToFile('data.json')` to persist.Implement your own validation logic before inserting/updating data.
Use require: `const JSONORM = require('json-orm');`Ensure you instantiate the class: `const db = new JSONORM(data);` then call `db.findSync(...)`.
Use an object: `db.findSync({ keyName: 'role', value: 'admin' })`.Wrap the update object in square brackets: `db.updateSync('path', [{ keyName: 'field', value: 'new' }])`.No dependency data recorded yet.