patchesFromChange
functionsignature
patchesFromChange(changedPaths, prevValues, nextValues): JsonPatch[]Builds RFC 6902 JSON Patch operations directly from a core
InstrumentedEvent: the changed dotted leaf paths plus their old/new values.
Parameters
| Name | Type | Description |
|---|---|---|
changedPaths | string[] | Dotted leaf paths that changed (slice-prefixed). |
| Name | Type | Description |
|---|---|---|
prevValues | Record<string, unknown> | Old value at each changed path, keyed by path. |
| Name | Type | Description |
|---|---|---|
nextValues | Record<string, unknown> | New value at each changed path, keyed by path. |
Returns
JsonPatch[], Array of JsonPatch operations describing the state transition.