Socket
Socket
Sign inDemoInstall

@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 5.0.4 to 5.1.0

main.mjs

2

main.js

@@ -36,3 +36,3 @@ 'use strict';

options = options || {};
if (!helpers.isObject(options)) throw new Error('options is invalid');
if (!helpers.isObject(options)) { throw new Error('options is invalid'); }
var units = options.units;

@@ -39,0 +39,0 @@

{
"name": "@turf/distance",
"version": "5.0.4",
"version": "5.1.0",
"description": "turf distance module",
"main": "main",
"module": "index",
"jsnext:main": "index",
"main": "main.js",
"module": "main.mjs",
"types": "index.d.ts",

@@ -12,3 +11,4 @@ "files": [

"index.d.ts",
"main.js"
"main.js",
"main.mjs"
],

@@ -18,3 +18,4 @@ "scripts": {

"test": "node -r @std/esm test.js",
"bench": "node -r @std/esm bench.js"
"bench": "node -r @std/esm bench.js",
"docs": "node ../../scripts/generate-readmes"
},

@@ -42,2 +43,3 @@ "repository": {

"rollup": "*",
"rollup-plugin-buble": "*",
"tape": "*",

@@ -47,4 +49,4 @@ "write-json-file": "*"

"dependencies": {
"@turf/helpers": "^5.0.4",
"@turf/invariant": "^5.0.4"
"@turf/helpers": "^5.1.0",
"@turf/invariant": "^5.1.0"
},

@@ -51,0 +53,0 @@ "@std/esm": {

@@ -7,3 +7,3 @@ # @turf/distance

Calculates the distance between two [points](http://geojson.org/geojson-spec.html#point) in degrees, radians,
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

@@ -15,4 +15,4 @@ [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula)

- `from` **Coord** origin point
- `to` **Coord** destination point
- `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 `{}`)

@@ -19,0 +19,0 @@ - `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'`)

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