
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
deep-diff-ts
Advanced tools
Fast deep object diff and patch with full TypeScript types. Compare nested objects, arrays, dates, and regexps. Zero dependencies, ~1.4KB.

npm install deep-diff-ts
import { diff } from "deep-diff-ts";
const oldObj = {
name: "Alice",
age: 30,
tags: ["admin"],
config: { theme: "dark" },
};
const newObj = {
name: "Alice",
age: 31,
tags: ["admin", "editor"],
config: { theme: "light" },
};
const changes = diff(oldObj, newObj);
// [
// { type: "UPDATE", path: ["age"], oldValue: 30, value: 31 },
// { type: "CREATE", path: ["tags", 1], value: "editor" },
// { type: "UPDATE", path: ["config", "theme"], oldValue: "dark", value: "light" }
// ]
import { diff, applyDiff } from "deep-diff-ts";
const changes = diff(oldObj, newObj);
const result = applyDiff(oldObj, changes);
// result deeply equals newObj
// oldObj is not mutated
Each difference has a type and path:
| Type | Fields | Description |
|---|---|---|
CREATE | path, value | Property was added |
UPDATE | path, oldValue, value | Property value changed |
DELETE | path, oldValue | Property was removed |
path is an array of keys/indices: ["users", 0, "name"]
Object.is)diff(oldObj, newObj)Returns Difference[] describing all changes from oldObj to newObj.
applyDiff(target, diffs)Returns a new object with all diffs applied. Does not mutate the original.
Ofer Shapira
MIT
FAQs
Fast deep object diff with full TypeScript types — zero dependencies
We found that deep-diff-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.