js-orm-lib v1.0.9 is a lightweight JavaScript ORM library focused on mapping backend API responses to front-end data models and vice versa. It uses a simple mapping configuration with string paths and custom transformation functions. Key differentiators: supports nested field mapping, entity name wrapping for reverse mapping, and requires explicit transformForApi when using functional mappings to ensure data integrity. Release cadence is low; this is the latest stable version. No notable alternatives with the same simplicity.
npm install js-orm-libNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: mapping from API data to frontend model with string paths, function fields, transforms, and reverse mapping.
Always include transformForApi when using functional mappings or transformFromApi.
Be aware that only string paths are reversed; custom logic must be handled in transformForApi.
Do not use async/await in mapping functions; preprocess data before mapping if asynchronous operations are needed.
Ensure the response object contains the expected nested property before accessing it. Use optional chaining or check existence.
Add transformForApi to the mapping configuration.
Ensure mapping is a plain object with string keys and string/function values.
No dependency data recorded yet.