https://github.com/y-js/y-memory
Memory database adapter for Yjs
https://github.com/y-js/y-memory
yjs yjs-database
Last synced: about 1 year ago
JSON representation
Memory database adapter for Yjs
- Host: GitHub
- URL: https://github.com/y-js/y-memory
- Owner: y-js
- License: other
- Created: 2015-11-07T23:45:00.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-07-06T13:25:14.000Z (almost 9 years ago)
- Last Synced: 2025-04-10T21:09:39.914Z (about 1 year ago)
- Topics: yjs, yjs-database
- Language: JavaScript
- Homepage:
- Size: 557 KB
- Stars: 5
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# In-Memory database adapter for [Yjs](https://github.com/y-js/yjs)
Use the Memory database adapter to store your shared data efficiently in-memory. The next time you join the session, your changes will be lost
* Supported by all browsers
* Very fast access
## Use it!
Install this with bower or npm.
##### Bower
```
bower install y-memory --save
```
##### NPM
```
npm install y-memory --save
```
### Example
```
Y({
db: {
name: 'memory'
},
connector: {
name: 'websockets-client', // use the websockets connector
room: 'Textarea-example-dev'
},
share: {
textarea: 'Text' // y.share.textarea is of type Y.Text
}
}).then(function (y) {
// bind the textarea to a shared text element
y.share.textarea.bind(document.getElementById('textfield'))
}
```
## License
Yjs is licensed under the [MIT License](./LICENSE).