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

@turf/distance

Package Overview
Dependencies
Maintainers
4
Versions
57
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 6.0.0 to 6.0.1

9

package.json
{
"name": "@turf/distance",
"version": "6.0.0",
"version": "6.0.1",
"description": "turf distance module",
"main": "index",
"types": "index.d.ts",
"files": [
"index.js",
"index.ts"
"index.d.ts"
],

@@ -38,3 +39,5 @@ "scripts": {

"tape": "*",
"write-json-file": "*"
"write-json-file": "*",
"tslint": "*",
"@types/tape": "*"
},

@@ -41,0 +44,0 @@ "dependencies": {

@@ -7,13 +7,11 @@ # @turf/distance

Calculates the distance between two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) in degrees, radians,
miles, or kilometers. This uses the
[Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula)
to account for global curvature.
Calculates the distance between two [points][1] in degrees, radians, miles, or kilometers.
This uses the [Haversine formula][2] to account for global curvature.
**Parameters**
- `from` **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** origin point
- `to` **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** destination point
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional parameters (optional, default `{}`)
- `options.units` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
- `from` **[Coord][3]** origin point
- `to` **[Coord][3]** destination point
- `options` **[Object][4]** Optional parameters (optional, default `{}`)
- `options.units` **[string][5]** can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)

@@ -35,4 +33,16 @@ **Examples**

Returns **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** distance between the two points
Returns **[number][6]** distance between the two points
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[2]: http://en.wikipedia.org/wiki/Haversine_formula
[3]: https://tools.ietf.org/html/rfc7946#section-3.1.1
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
<!-- This file is automatically generated. Please don't edit it directly:

@@ -39,0 +49,0 @@ if you find an error, edit the source file (likely index.js), and re-run

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