From d036168a131cc255a5ab4aea8ecfb35681eae19f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Benjam=C3=ADn=20Eidelman?=
Date: Fri, 21 Mar 2025 17:46:49 -0300
Subject: [PATCH] fix: README badges & npm prepack
---
.gitignore | 5 ++++
README.md | 36 +++++++++++++++++------------
docs/arrays.md | 2 +-
docs/deltas.md | 2 +-
docs/formatters.md | 2 +-
packages/jsondiffpatch/package.json | 4 ++--
6 files changed, 31 insertions(+), 20 deletions(-)
diff --git a/.gitignore b/.gitignore
index e1a8a21a..95922ce4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,8 @@ lib
npm-debug.log
.idea/
+
+packages/jsondiffpatch/README.md
+packages/jsondiffpatch/MIT-LICENSE.txt
+
+*.local.*
\ No newline at end of file
diff --git a/README.md b/README.md
index 35699490..92a7c30d 100644
--- a/README.md
+++ b/README.md
@@ -1,28 +1,34 @@
-# jsondiffpatch
+
+
jsondiffpatch
+
+ jsondiffpatch.com
+
+ Diff & patch JavaScript objects
+
+
-
-[](http://travis-ci.org/benjamine/jsondiffpatch)
-[](https://codeclimate.com/github/benjamine/jsondiffpatch)
-[](https://codeclimate.com/github/benjamine/jsondiffpatch)
-[](http://badge.fury.io/js/jsondiffpatch)
-[](https://david-dm.org/benjamine/jsondiffpatch)
-
-Diff & patch JavaScript objects
+
+
+
+
+
+
+
---
-## **[Live Demo](http://benjamine.github.io/jsondiffpatch/index.html)**
+## **[Live Demo](https://jsondiffpatch.com)**
- min+gzipped ~ 16KB
- browser and server (ESM-only)
+- deep diff, use delta to patch
- (optionally) uses [google-diff-match-patch](http://code.google.com/p/google-diff-match-patch/) for long text diffs (diff at character level)
- smart array diffing using [LCS](http://en.wikipedia.org/wiki/Longest_common_subsequence_problem), **_IMPORTANT NOTE:_** to match objects inside an array you must provide an `objectHash` function (this is how objects are matched, otherwise a dumb match by position is used). For more details, check [Array diff documentation](docs/arrays.md)
-- reverse a delta
-- unpatch (eg. revert object to its original state using a delta)
+- reverse a delta, unpatch (eg. revert object to its original state using a delta)
- simplistic, pure JSON, low footprint [delta format](docs/deltas.md)
- multiple output formatters:
- - html (check it at the [Live Demo](http://benjamine.github.io/jsondiffpatch/index.html))
+ - html (check it at the [Live Demo](https://jsondiffpatch.com))
- annotated json (html), makes the JSON delta format self-explained
- console (colored), try running `./node_modules/.bin/jsondiffpatch left.json right.json`
- JSON Patch format RFC 6902 support
@@ -31,7 +37,7 @@ Diff & patch JavaScript objects
## Supported platforms
-- Any browser that supports ES6
+- Any browser that [supports ES6](https://caniuse.com/es6)
- Node.js 18, 20+
## Usage
@@ -270,7 +276,7 @@ const jsondiffpatchInstance = jsondiffpatch.create({