@loro-dev/flock 4.4.4 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -53,6 +53,14 @@ unsubscribe();
53
53
  - Track causal progress with `version()` and `getMaxPhysicalTime()` when orchestrating incremental syncs.
54
54
  - Use `Flock.checkConsistency()` in tests to assert that two replicas converged to the same state.
55
55
 
56
+ ## JSON Compatibility
57
+
58
+ Flock stores strict JSON data. Keys and values may use strings, finite numbers,
59
+ booleans, null, arrays, and plain objects. Values that structured clone can
60
+ represent but JSON cannot, such as `undefined`, `bigint`, functions, symbols,
61
+ `NaN`, and infinities, are rejected instead of being preserved or silently
62
+ dropped.
63
+
56
64
  ## Type Basics
57
65
 
58
66
  - `Value`: JSON-compatible data (`string`, `number`, `boolean`, `null`, nested arrays/objects).
@@ -113,7 +121,7 @@ All types are exported from the package entry point for use in TypeScript projec
113
121
 
114
122
  ### Utilities
115
123
 
116
- - `exportJson`, `importJson`, `kvToJson`, and `fromJson` all work with plain JavaScript objects, so they serialise cleanly through JSON or structured clone.
124
+ - `exportJson`, `importJson`, `kvToJson`, and `fromJson` all work with plain JavaScript objects that serialize cleanly through JSON.
117
125
  - Keys are encoded using MoonBit’s memcomparable format; use simple scalars and natural ordering for predictable scans.
118
126
 
119
127
  ## Error Handling