Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.15 KB

File metadata and controls

45 lines (30 loc) · 1.15 KB

@nyamathhh/fast-json-patch

⚠️ Temporary Fork - This is a fork of fast-json-patch with Date object support while PR #330 is pending.

Installation

npm install @nyamathhh/fast-json-patch

What's Different

Native Date object support:

  • Date objects preserved during cloning
  • Date comparison by value (not reference)
  • Patches contain actual Date objects

Usage

const { compare } = require('@nyamathhh/fast-json-patch');

const obj1 = { time: new Date('2025-11-11T10:00:00Z') };
const obj2 = { time: new Date('2025-11-11T11:00:00Z') };

const patches = compare(obj1, obj2);
// [{ op: 'replace', path: '/time', value: Date(...) }]

Migration

Once PR #330 is merged, switch back:

npm uninstall @nyamathhh/fast-json-patch
npm install fast-json-patch@^3.2.0

No code changes needed!

Links