An Ember addon providing a storageFor computed property that persists data to localStorage or sessionStorage with an ember-data adapter.
Ember Local Storage is an Ember.js addon that provides a `storageFor` computed property to persist Ember objects and arrays to the browser's localStorage or sessionStorage. It solves the problem of maintaining client-side state across page reloads without server-side dependencies. The addon includes an ember-data adapter for seamless integration with Ember Data models.
Ember.js developers who need to persist client-side data locally, such as user preferences, session data, or offline-capable application state. It's particularly useful for projects using Ember Data that require lightweight, browser-based storage.
Developers choose Ember Local Storage because it integrates natively with Ember's reactivity system, reduces boilerplate for localStorage/sessionStorage interactions, and provides full Ember Data adapter support with relationship handling and query capabilities.
The addon provides a storageFor computed property that returns a proxy and persists the changes to localStorage or sessionStorage. It ships with an ember-data adapter.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The `storageFor` computed property feels idiomatic to Ember's reactivity system, reducing boilerplate and automatically syncing changes to browser storage.
Includes an adapter and serializer that mimic JSONAPIAdapter behavior, with relationship sugar like `dependent: 'destroy'` and `autoSave` for seamless model persistence.
Supports querying by attributes or relationships using strings or regex, allowing flexible filtering without custom logic, as shown in the README examples.
Provides import/export helpers for data migration and a `resetStorages` test helper to simplify cleanup, easing development and testing workflows.
Relies on localStorage/sessionStorage, which have strict size caps (e.g., 5MB per origin) and lack features like indexing or transactions, making it unsuitable for large datasets.
Tightly coupled with Ember.js and Ember Data; the addon's API and generators are framework-specific, limiting portability if the project migrates away from Ember.
Requires careful setup for namespacing and key delimiters, and the README notes deprecations like `legacyKey` and initializer changes, complicating upgrades and maintenance.