
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.
ng-haversine
Advanced tools
ng-haversine is an AngularJS module that applies the Haversine formula to a pair of coordinates to calculate the distance between them.
ng-haversine is an AngularJS module that applies the Haversine formula to a pair of coordinates to calculate the distance between them.
The first step is to download the ng-haversine script. You can do it cloning this repo:
$ git clone https://github.com/vermicida/ng-haversine.git
Or via NPM:
$ npm install ng-haversine
Once the library is downloaded, make sure you are referencing it in your index.html
, just after the AngularJS library reference:
<script src="./node_modules/ng-haversine/ng-haversine.min.js"></script>
You must inject the ng-haversine dependency within your module setter:
angular.module("test", ["dahr.ng-haversine"]);
Now, you are ready to go. You will need two coordinates given in the format below:
var coord1 = {
"latitude": 40.4169473,
"longitude": -3.7057172
};
var coord2 = {
"latitude": 40.4236942,
"longitude": -3.7109793
};
To calculate the distance between them, you must use the function distance()
from the service $haversine
:
var distance = $haversine.distance(coord1, coord2);
IMPORTANT: The distance is given in meters.
Code released under the MIT license.
FAQs
ng-haversine is an AngularJS module that applies the Haversine formula to a pair of coordinates to calculate the distance between them.
The npm package ng-haversine receives a total of 0 weekly downloads. As such, ng-haversine popularity was classified as not popular.
We found that ng-haversine 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.