0.18.7 • Published 6 days ago

ywasm v0.18.7

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

Ywasm

This project is a wrapper around Yrs and targets Web Assembly bindings.

It's a library used on collaborative document editing using Conflict-free Replicated Data Types. This enables to provide a shared document editing experience on a client devices without explicit requirement for hosting a single server - CRDTs can resolve potential update conflicts on their own with no central authority - as well as provide first-class offline editing capabilities, where document replicas are modified without having connection to each other, and then synchronize automatically once such connection is enabled.

Documentation

Example

import * as Y from 'ywasm';

const doc = new Y.YDoc()
const text = doc.getText('name')

// append text to our collaborative document
text.insert(0, 'hello world', { bold: true })

// simulate update with remote peer
const remoteDoc = new Y.YDoc()
const remoteText = remoteDoc.getText('name')

// in order to exchange data with other documents
// we first need to create a state vector
const remoteSV = Y.encodeStateVector(remoteDoc)
// now compute a differential update based on remote document's state vector
const update = Y.encodeStateAsUpdate(doc, remoteSV)
// both update and state vector are serializable, we can pass them over the wire
// now apply update to a remote document
Y.applyUpdate(remoteDoc, update)

const str = remoteText.toString()
console.log(str)
0.18.4

7 days ago

0.18.5

6 days ago

0.18.6

6 days ago

0.18.7

6 days ago

0.18.3

27 days ago

0.18.2

1 month ago

0.18.1

2 months ago

0.18.0

2 months ago

0.17.4

4 months ago

0.17.3

4 months ago

0.17.2

5 months ago

0.17.0

6 months ago

0.17.1

6 months ago

0.16.10

10 months ago

0.16.6

11 months ago

0.16.7

11 months ago

0.16.8

11 months ago

0.16.9

11 months ago

0.16.3

1 year ago

0.16.4

1 year ago

0.16.5

1 year ago

0.15.0

1 year ago

0.16.0

1 year ago

0.16.1

1 year ago

0.16.2

1 year ago

0.13.0

1 year ago

0.12.1

2 years ago

0.14.0

1 year ago

0.12.2

1 year ago

0.14.1

1 year ago

0.12.0

2 years ago

0.9.3

2 years ago

0.11.0

2 years ago

0.10.1

2 years ago

0.11.1

2 years ago

0.10.2

2 years ago

0.11.2

2 years ago

0.10.3

2 years ago

0.10.4

2 years ago

0.10.5

2 years ago

0.10.6

2 years ago

0.10.0

2 years ago

0.9.0

2 years ago

0.8.1

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.8.0

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago

0.6.2

2 years ago

0.5.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.4.0

2 years ago

0.1.0

3 years ago