You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

@saulx/diff

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saulx/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

2.0.0
Version published
Weekly downloads
264
-53.85%
Maintainers
1
Weekly downloads
 
Created

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

Keywords

FAQs

Package last updated on 02 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts