A reactive Storage implementation for Atoms that persists non-critical data like user selections across sessions. v0.5.5 stable, low release cadence. Key differentiator: designed for the calmm-js Atom ecosystem (bacon.atom or kefir.atom), provides sharing of atoms with the same key, schema validation, expiry, and debounced writes — not a general-purpose storage wrapper.
npm install atom.storageNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Stored atom backed by localStorage using bacon.atom, reads initial value, and modifies it to trigger persistence.
Call modify() after creation if immediate persistence is needed.
Be aware that atoms are shared; avoid creating separate instances expecting different identities.
Ensure values are JSON-serializable.
Install and import either 'bacon.atom' or 'kefir.atom'.
Understand expiry logic: checks timestamps on creation, may still read stale if not re-created.
Ensure you import and pass Atom in the options object.
Clear the storage key manually: localStorage.removeItem('your-key')Ensure the value is a plain JSON-serializable object or primitive.