Engines & entrypoints
Optional engines live on tree-shakeable subpaths. Root keeps compatibility re-exports for core helpers.
Previous: DX / DiffView · Next: Merge
Subpath map
| Import | Exports | Notes |
|---|---|---|
@jayoncode/object-diff | diff, compare, hasChanges, filters, patch, applyPatch, serialize, … | Compatibility entry |
@jayoncode/object-diff/core | diff, compare, hasChanges, filters | Slim — no patch/serialize |
@jayoncode/object-diff/patch | patch, applyPatch, validate, optimize, … | Patch domain |
@jayoncode/object-diff/formatter | serialize, createSerializer | Formats + plugins |
@jayoncode/object-diff/merge | merge | Two-/three-way merge |
@jayoncode/object-diff/query | find, filter, exclude, query, … | DiffResult helpers |
@jayoncode/object-diff/stats | statistics | Rich metrics |
@jayoncode/object-diff/plugins | createEngine | Opt-in plugin host |
@jayoncode/object-diff/view | createDiffView, explain | Fluent DX toolbox |
When to use which
| Goal | Prefer |
|---|---|
| Dirty check only | /core + hasChanges |
| Sync ops over the wire | /patch |
| Collaborative drafts | /merge |
| Filter an existing diff | /query |
| Telemetry / dashboards | /stats |
| Custom matchers / formatters / hooks | /plugins |
| Review / explain a DiffResult | /view + explain() |
| Fluent chaining | /view |
Root import of merge/query/stats/plugins is not supported — use the subpath.
Guides
| Engine | Guide |
|---|---|
| Merge | Merge |
| Query | Query |
| Statistics | Statistics |
| Plugins | Plugins |
| Fluent DX | DX |
| Integrations | Integrations |
| Performance / budgets | Performance |
