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.3 to 0.1.4

4

package.json
{
"name": "turf-distance",
"version": "0.1.3",
"version": "0.1.4",
"description": "turf distance module",

@@ -26,4 +26,4 @@ "main": "index.js",

"devDependencies": {
"tape": "^2.12.2"
"tape": "^2.13.3"
}
}

@@ -7,2 +7,24 @@ turf-distance

###Install
```sh
npm install turf-distance
```
###Parameters
|name|description|
|---|---|
|point1|point feature|
|point2|point feature|
|units|'miles' or 'kilometers'|
###Usage
```js
distance(point1, point2, units)
```
###Example
```javascript

@@ -14,7 +36,7 @@ var distance = require('turf-distance')

var point2 = point(-75.534, 39.123)
var unit = 'miles' // or 'kilometers', 'degrees', 'radians'
var units = 'miles' // or 'kilometers', 'degrees', 'radians'
var distanced = distance(point1, point2, unit)
var distanced = distance(point1, point2, units)
console.log(distanced)
```
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