You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Superdiff** provides a rich and readable diff for **arrays**, **objects**and **texts**. It supports **stream** and file inputs for handling large datasets efficiently, is battle-tested, has zero dependencies, and offers a **top-tier performance**.
14
+
**Superdiff** provides a rich and readable diff for **arrays**, **objects**, **texts**and **coordinates**. It supports **stream** and file inputs for handling large datasets efficiently, is battle-tested, has zero dependencies, and offers a **top-tier performance**.
15
15
16
16
ℹ️ The documentation is also available on our [website](https://superdiff.gitbook.io/donedeal0-superdiff)!
@@ -560,7 +562,7 @@ Compares two texts and returns a structured diff at a character, word, or senten
560
562
-`high`: slower but exact tokenization. Handles all language subtleties (Unicode, emoji, CJK scripts, locale‑aware segmentation when a locale is provided).
561
563
-`detectMoves`:
562
564
-`false` (default): optimized for readability. Token moves are ignored so insertions don’t cascade and break equality (recommended for UI diffing).
563
-
-`true`: semantically precise, but noiser — a single insertion shifts all following tokens, breaking equality.
565
+
-`true`: semantically precise, but noisier — a single insertion shifts all following tokens, breaking equality.
564
566
-`ignoreCase`: if `true`, `hello` and `HELLO` are considered equal.
565
567
-`ignorePunctuation`: if `true`, `hello!` and `hello` are considered equal.
566
568
-`locale`: the locale of your text. Enables locale‑aware segmentation in high accuracy mode.
@@ -721,6 +723,88 @@ getTextDiff(
721
723
722
724
<hr/>
723
725
726
+
### getGeoDiff
727
+
728
+
```js
729
+
import { getGeoDiff } from"@donedeal0/superdiff";
730
+
```
731
+
732
+
Returns a structured diff between two geographical coordinates. Supports 9 distance units, locale‑aware output, and two accuracy modes.
733
+
734
+
-**High‑accuracy mode** is based on the [Vincenty formulae](https://en.wikipedia.org/wiki/Vincenty%27s_formulae) (ellipsoidal Earth model, higher precision).
735
+
-**Normal-accuracy mode** is based on the [Haversine formulae](https://en.wikipedia.org/wiki/Haversine_formula) (spherical Earth model, faster, slightly less precise).
Copy file name to clipboardExpand all lines: package.json
+13-9Lines changed: 13 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
{
2
2
"name": "@donedeal0/superdiff",
3
-
"version": "4.1.0",
3
+
"version": "4.2.0",
4
4
"type": "module",
5
-
"description": "Superdiff provides a rich and readable diff for arrays, objectsand texts. It supports stream and file inputs for handling large datasets efficiently, is battle-tested, has zero dependencies, and offers a top-tier performance.",
5
+
"description": "Superdiff provides a rich and readable diff for arrays, objects, texts and coordinates. It supports stream and file inputs for handling large datasets efficiently, is battle-tested, has zero dependencies, and offers a top-tier performance.",
0 commit comments