An ORM adapter for functional-models that stores data in JSON files. Current version 3.0.2. This package implements the datastoreAdapter interface from functional-models, allowing you to use a JSON file as a database backend. It is designed for small-scale, file-based persistence, often used in prototyping, local development, or low-traffic applications. Unlike SQLite or LevelDB, it stores the entire dataset in a single JSON file, which is simple to inspect and version-control. Release cadence is irregular as it is part of the functional-models ecosystem.
npm install functional-models-orm-jsonNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to set up the ORM with a JSON file, define a model, and create/save a record.
Initialize the JSON file with an empty array ([]) if it does not exist.
Use only for small datasets, or consider an alternative backend like SQLite.
Ensure single-process access or use file locking.
Run npm install functional-models-orm-json and ensure correct import path.
Use const { datastoreAdapter } = require('functional-models-orm-json');Create the file or adjust the path; ensure the file contains a valid JSON array.