In-memory database adapter for Yjs, version 8.0.9. It provides a lightweight, ephemeral storage backend for collaborative editing with Yjs, discarding all data upon session end. Best for prototyping or stateless scenarios. Works in all browsers with fast access. Unlike persistent adapters (e.g., y-leveldb), it requires no external database setup. Released under MIT.
npm install y-memoryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import y-memory and use it with Yjs to create an in-memory document and manipulate a shared array.
Use `new Y.Doc()` and manage persistence separately.
Use a persistent adapter like y-indexeddb or y-leveldb for permanent storage.
Ensure Yjs version is >=9.0.0 and <14.0.0.
Use `npm install y-memory` instead.
Run `npm install y-memory` and add `import 'y-memory'` at the top of your file.
Use `new Y.Doc()` instead of `Y({...})`.Update Yjs to version 9.0.0-13.x.x with `npm install yjs@^13.0.0`.