
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
npm install geodaisy
Usage in JavaScript or TypeScript (typings are available):
Uses the Haversine Formula to calculate the distance between two earthly points of coordinates.
import { haversine } from 'geodaisy';
const atlanta = {
latitude: 33.749,
longitude: -84.388,
};
const london = {
latitude: 51.5074,
longitude: -0.1278,
};
const distance = haversine(
atlanta.longitude,
atlanta.latitude,
london.longitude,
london.latitude,
);
console.log(distance); // > 6769.949658450232
Given a distance as a number (this formula does not care about units) and the distance between the elevation change between two points - calculates the real distance between the two points in a straight line, e.g.:
import { distanceWithLatitude } from 'geodaisy';
const distance = 13800; // m
const elevation = 1120; // m
const realDistance = distanceWithLatitude(distance, elevation);
console.log(realDistance); // > 13845.374678931588
The following conversion utilities are also available:
import {
kmToMile,
mileToKm,
yardToMetre,
metreToYard,
inchToCm,
cmToInch,
} from 'geodaisy';
console.log(kmToMile(1)); // > 0.621371
console.log(mileToKm(1)); // > 1.6093444978925633
console.log(yardToMetre(1)); // > 0.9144
console.log(metreToYard(1)); // > 1.0936132983377078
console.log(inchToCm(1)); // > 2.54
console.log(cmToInch(1)); // > 0.39370078740157477
The following features I'd love to have in this library but just don't have the time to implement yet. If you'd like to help, feel free to contribute!
FAQs
Library for geodesic functions
We found that geodaisy demonstrated a not healthy version release cadence and project activity because the last version was released 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.