New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

datum-diff

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datum-diff

deep-diff js library rewritten in typescript

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

sources

the source code of the deep-diff js library has been migrated to typescript . it remains unmaintained and contains some serious bugs that made it unreliable for this project .

same interfaces have been exposed to maintain compatibility with the last version .

many thanks to the library author and all previous contributors !

usage

recommended to invoke via the wrapper method for simple cases :

import { deepDiff } from "datum-merge";
const datumDiff: Partial<MyType> = deepDiff<MyType>(target, source);

or use the existing library interfaces now with types :

import { diff, Diff, applyChange } from "datum-merge";
const simpleDiff: Diff[] = diff(target, source);
for (const dif of simpleDiff) { applyChange(target, null, dif); }

import { Diff, accumulateDiff, PreFilter, Accumulator } from "datum-merge";
const customDiff: Diff[] = accumulateDiff(target, source, prefilter, accum, orderIndep);

or for usage on browser environments:

<script src="https://unpkg.com/datum-diff@1.0.3/dist-diff/umd/deep-diff.min.js"></script>

see the readme in the original library for detailed examples .

datum-diff

module recently published as a standalone package datum-diff

works as a drop-in replacement for the package deep-diff

simply use datum-diff instead of the datum-merge libary in the examples above .

changes

  • all functions and responses are typed
  • lhs and rhs should be immutable ( had bug when orderIndependent=true )
  • diff response should be immutable
  • general code upgrades and variable cleanup
  • avoid introducing any dependancies within module
  • bundled package size is seven times smaller

Keywords

diff

FAQs

Package last updated on 14 Jul 2025

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