
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@tomasperezv/geolocation
Advanced tools
Retrieve geolocation information, compute distances and paths over geographic coordinates
Library for retrieving geolocation informatoin, computing distances and paths over geographic coordinates.
It provides an abstraction layer based on promises on top of the Google Maps API and the Geolocation HTML API.
The library provides the object Geolocation
that contains the different utilities.
Wraps functionality related with the navigator.geolocation
API.
Geolocation.Detector.detect()
.then((position) => {
console.log(position.coords.latitude); // e.g. 60.34
console.log(position.coords.longitude); // e.g. 18.23
});
Geolocation.Detector.detectAddress()
.then((address) => {
console.log(address); // e.g. 'Calle Domingo Pardo, 11, 28035 Madrid, Spain'
});
Geolocation.Detector.getPositionCoordinates(); // e.g. { cords: { longitude: 60.45, latitude: 18.23 } }
Provides several different utilities to perform operations such as computing distances between coordinates.
const origin = new google.maps.LatLng(40.4811241,-3.7207215);
const destination = new google.maps.LatLng(40.4822748,-3.7181358)
const distance = Geolocation.PathFinder.computeDistance(origin, destination); // 253.6543534046843 (meters)
const path = [
new google.maps.LatLng(40.4811241,-3.7207215),
new google.maps.LatLng(40.4822748,-3.7181358),
new google.maps.LatLng(40.4806753,-3.7138657)
];
const newPath = Geolocation.PathFinder.filterPathByDistance(path, 500); // Reduce the list of points to a path of 500 meters.
const path = [
new google.maps.LatLng(40.4811241,-3.7207215),
new google.maps.LatLng(40.4822748,-3.7181358),
new google.maps.LatLng(40.4806753,-3.7138657)
];
// Compose a new path based on an estimated arrival time and a base speed of 50 km/h
const newPath = Geolocation.PathFinder.filterPathByArrivalTime(path, 50, 'Sun Feb 24 2016 10:52:36 GMT+0100');
npm test
eslint ./src/ ./test/
FAQs
Retrieve geolocation information, compute distances and paths over geographic coordinates
We found that @tomasperezv/geolocation 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.