streamich / json-joy

JSON CRDT, JSON CRDT Patch, JSON Patch+, JSON Predicate, JSON Pointer, JSON Expression, JSON Type
https://jsonjoy.com/libs/json-joy-js
Apache License 2.0
697 stars 11 forks source link

JSON CRDT `.fromBinary()` improvements #609

Closed streamich closed 2 months ago

streamich commented 2 months ago

Consider adding a new static .load() method, which simplifies

const model = Model
  .fromBinary(blob)
  .setSchema(schema)
  .fork(sid);

to

const model = Model.load(blob, sid, schema);