An Ampersand.js model mixin for persisting data across multiple storage backends. Stable version 5.1.5, released as part of MongoDB Compass ecosystem. Provides pluggable storage adapters (indexedDB, local storage, LevelDB, S3, MongoDB) with automatic serialization. Key differentiator: seamless integration with Ampersand models and reactive data synchronization.
npm install storage-mixinNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use storage-mixin with Ampersand Model, LevelUP backend, namespace, and saving.
Use default export directly (import storageMixin from 'storage-mixin') instead of destructuring.
Install required peer dependency like 'levelup' for LevelDB backend.
Use indexedDB backend for cross-platform persistence.
Override serialize/deserialize in your model if needed.
Install with `npm install storage-mixin` and check import statement.
Use `import storageMixin from 'storage-mixin'` directly.
Specify a backend property with one of the supported backends, e.g., `backend: backends.local`.
Run `npm install levelup`.