Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

turf-distance

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-distance - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

8

index.js

@@ -9,6 +9,6 @@ //http://en.wikipedia.org/wiki/Haversine_formula

var dLat = toRad(coordinates2[0] - coordinates1[0])
var dLon = toRad(coordinates2[1] - coordinates1[1])
var lat1 = toRad(coordinates1[1])
var lat2 = toRad(coordinates2[1])
var dLat = toRad(coordinates2[1] - coordinates1[1])
var dLon = toRad(coordinates2[0] - coordinates1[0])
var lat1 = toRad(coordinates1[0])
var lat2 = toRad(coordinates2[0])
var a = Math.sin(dLat/2) * Math.sin(dLat/2) +

@@ -15,0 +15,0 @@ Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2)

{
"name": "turf-distance",
"version": "0.1.0",
"version": "0.1.1",
"description": "turf distance module",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -9,3 +9,3 @@ var test = require('tape')

}
var pt2 = {
var pt2 = {
"type": "Feature",

@@ -16,5 +16,5 @@ "geometry": {"type": "Point", "coordinates": [-75.534, 39.123]}

var dist = distance(pt1, pt2, 'miles')
t.ok(dist, 'should return a distance')
t.ok(dist, 'should return a distance')
t.end()
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc