Skip to content

Commit aeecdc1

Browse files
committed
chore: fix: typo
1 parent cdd1e36 commit aeecdc1

7 files changed

Lines changed: 1168 additions & 993 deletions

File tree

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
## FEATURES
2121

22-
**Superdiff** exports 4 functions:
22+
**Superdiff** exports 5 functions:
2323

2424
- [getObjectDiff](#getobjectdiff)
2525
- [getListDiff](#getlistdiff)
@@ -44,8 +44,8 @@
4444
| Object diff ||||||
4545
| List diff ||| ⚠️ || ⚠️ |
4646
| Text diff ||||||
47+
| Coordinates diff ||||||
4748
| Streaming for huge datasets ||||||
48-
| Geo diff ||||||
4949
| Move detection ||||||
5050
| Output refinement ||||||
5151
| Zero dependencies ||||||
@@ -729,9 +729,10 @@ getTextDiff(
729729
import { getGeoDiff } from "@donedeal0/superdiff";
730730
```
731731

732-
Returns a structured diff between two geographical coordinates. Supports 9 distance units (centimeters, feet, inches, kilometers, meters, miles, Scandinavian miles, millimeters, yards), locale-aware response, and two accuracy modes.
732+
Returns a structured diff between two geographical coordinates. Supports 9 distance units, localeaware output, and two accuracy modes.
733733

734-
The high accuracy mode is based on the [Vincenty formulae](https://en.wikipedia.org/wiki/Vincenty%27s_formulae) (ellipsoidal Earth model, higher precision). The normal mode is based on the [Haversine formulae](https://en.wikipedia.org/wiki/Haversine_formula) (spherical Earth model, faster, slightly less precise).
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).
735736

736737
#### FORMAT
737738

@@ -741,10 +742,10 @@ The high accuracy mode is based on the [Vincenty formulae](https://en.wikipedia.
741742
previousCoordinates: [number, number] | null | undefined;
742743
coordinates: [number, number] | null | undefined;
743744
options?: {
744-
unit?: "centimeter", "foot", "inch", "kilometer", "meter", "mile", "mile-scandinavian", "millimeter" | "yard", // "kilometers" by default
745-
accuracy?: "normal" | "high", // "normal" by default
746-
maxDecimals?: number, // 2 by default,
747-
locale?: Intl.Locale | string // "en-US" by default
745+
unit?: "centimeter" | "foot" | "inch" | "kilometer" | "meter" | "mile" | "mile-scandinavian" | "millimeter" | "yard"; // "kilometer" by default
746+
accuracy?: "normal" | "high"; // "normal" by default
747+
maxDecimals?: number; // 2 by default,
748+
locale?: Intl.Locale | string; // "en-US" by default
748749
}
749750
```
750751
- `previousCoordinates`: the original list (`[Longitude, Latitude]`).
@@ -753,7 +754,7 @@ The high accuracy mode is based on the [Vincenty formulae](https://en.wikipedia.
753754
- `unit`: centimeter, foot, inch, kilometer, meter, mile, mile-scandinavian, millimeter or yard.
754755
- `accuracy`:
755756
- `normal` (default): fastest mode, with a small error margin, based on Haversine formula.
756-
- `high`: slower but exact distance. Based on Vincenty formula.
757+
- `high`: slower but highly precise distance. Based on Vincenty formula.
757758
- `maxDecimals`: maximal decimals for the distance. Defaults to 2.
758759
- `locale`: the locale of your distance. Enables a locale‑aware distance label.
759760

@@ -767,7 +768,7 @@ type GeoDiff = {
767768
coordinates: [number, number] | null;
768769
previousCoordinates: [number, number] | null;
769770
distance: number;
770-
unit: "centimeters", "feet", "inches", "kilometers", "meters", "miles", "scandinavian miles", "millimeters" | "yards";
771+
unit: "centimeter" | "foot" | "inch" | "kilometer" | "meter" | "mile" | "mile-scandinavian" | "millimeter" | "yard";
771772
label: string,
772773
direction: "east" | "north" |"south" | "west" | "north-east" | "north-west" | "south-east" | "south-west" | "stationary";
773774
};
@@ -792,7 +793,7 @@ getGeoDiff(
792793
+ status: "updated",
793794
diff: {
794795
+ coordinates: [-0.1278, 51.5074],
795-
previousCoordinates": [2.3522, 48.8566],
796+
previousCoordinates: [2.3522, 48.8566],
796797
+ direction: "north-west",
797798
+ distance: 343.56,
798799
+ label: "343.56 kilometers",

0 commit comments

Comments
 (0)