localstorage-orm is a lightweight TypeScript ORM for browser localStorage that provides a model-based CRUD interface with schema validation, timestamps, soft deletes, and reference/population support. Current stable version is 1.1.0. It uses a simple builder pattern for records and supports find/findById methods. Key differentiators: direct localStorage persistence with no backend required, TypeScript-first with type safety, and built-in reference population for relational data management within the browser. Release cadence is irregular; latest update was September 2024.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Package is ESM-only; CommonJS require may cause runtime errors. Ensure 'type':'module' in package.json or use .mjs extension.
Schema is a named export, not default. Also required as base interface for model schemas.
Constructor requires a string model name and optional settings object. The generic type parameter should extend Schema.
Create a model, build a record, persist, fetch, update, and delete using Model and Schema.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.