jsonapi-model-formatter v0.1.14 is a small utility that formats dovima models into JSON API-compliant JSON. It acts as a middleware formatter for the dovima ORM, so that calling toJSON on a model returns a JSON API resource object. The package is in early stages, with sporadic releases, and is tightly coupled to the dovima ecosystem. It supports both ES6 import and ES5 require. Compared to general JSON API serializers like jsonapi-serializer, this is specialized for dovima and not actively maintained beyond 0.1.x.
npm install jsonapi-model-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import, assign to dovima Model, and use toJSON to get JSON API formatted output.
Consider using a standalone JSON API serializer like jsonapi-serializer or fast-jsonapi.
Use import JsonApiModelFormatter from 'jsonapi-model-formatter'; instead of import { JsonApiModelFormatter } from 'jsonapi-model-formatter';Only use this formatter with dovima Model instances.
Use a more recent JSON API serialization library, or test compatibility on your Node version.
Change to import JsonApiModelFormatter from 'jsonapi-model-formatter';
Ensure import is default import and that the package is installed properly.