Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@saulx/diff

atelier-saulx1.5kMIT2.0.3TypeScript support: included

Deep diff packages works on arrays and order changes. Creates very small patches for atomic changes. Big difference with other diffing packages is the handling of arrays and similarities in objects, works very well for patching of a few objects in a large

diff, patch

readme

Diff

Deep diff packages works on arrays and order changes. Creates very small patches for atomic changes. Big difference with other diffing packages is the handling of arrays and similarities in objects, works very well for patching of a few objects in a large array.

import diff, { applyPatch } from '@saulx/diff'

const a = { x: true, b: [1, 5, 6] }
const b = { x: true, b: [1, 3, 4] }

const patch = diff(a, b)

applyPatch(a, patch)

Benchmark