Socket
Socket
Sign inDemoInstall

@turf/distance

Package Overview
Dependencies
Maintainers
6
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.2.0-alpha.2 to 6.2.0-alpha.3

dist/es/package.json

8

dist/es/index.js

@@ -1,3 +0,3 @@

import { getCoord } from '@turf/invariant';
import { radiansToLength, degreesToRadians } from '@turf/helpers';
import { getCoord } from "@turf/invariant";
import { radiansToLength, degreesToRadians } from "@turf/helpers";
//http://en.wikipedia.org/wiki/Haversine_formula

@@ -31,4 +31,4 @@ //http://www.movable-type.co.uk/scripts/latlong.html

var coordinates2 = getCoord(to);
var dLat = degreesToRadians((coordinates2[1] - coordinates1[1]));
var dLon = degreesToRadians((coordinates2[0] - coordinates1[0]));
var dLat = degreesToRadians(coordinates2[1] - coordinates1[1]);
var dLon = degreesToRadians(coordinates2[0] - coordinates1[0]);
var lat1 = degreesToRadians(coordinates1[1]);

@@ -35,0 +35,0 @@ var lat2 = degreesToRadians(coordinates2[1]);

@@ -1,2 +0,2 @@

import { Coord, Units } from '@turf/helpers';
import { Coord, Units } from "@turf/helpers";
/**

@@ -3,0 +3,0 @@ * Calculates the distance between two {@link Point|points} in degrees, radians, miles, or kilometers.

@@ -33,4 +33,4 @@ "use strict";

var coordinates2 = invariant_1.getCoord(to);
var dLat = helpers_1.degreesToRadians((coordinates2[1] - coordinates1[1]));
var dLon = helpers_1.degreesToRadians((coordinates2[0] - coordinates1[0]));
var dLat = helpers_1.degreesToRadians(coordinates2[1] - coordinates1[1]);
var dLon = helpers_1.degreesToRadians(coordinates2[0] - coordinates1[0]);
var lat1 = helpers_1.degreesToRadians(coordinates1[1]);

@@ -37,0 +37,0 @@ var lat2 = helpers_1.degreesToRadians(coordinates2[1]);

{
"name": "@turf/distance",
"version": "6.2.0-alpha.2",
"version": "6.2.0-alpha.3",
"description": "turf distance module",

@@ -26,2 +26,6 @@ "author": "Turf Authors",

"module": "dist/es/index.js",
"exports": {
"import": "./dist/es/index.js",
"require": "./dist/js/index.js"
},
"types": "dist/js/index.d.ts",

@@ -33,10 +37,9 @@ "sideEffects": false,

"scripts": {
"bench": "npm-run-all prepare bench:run",
"bench:run": "node bench.js",
"bench": "ts-node bench.js",
"build": "npm-run-all build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "node ../../scripts/generate-readmes",
"prepare": "npm-run-all prepare:*",
"prepare:es": "tsc --outDir dist/es --module esnext --declaration false",
"prepare:js": "tsc",
"test": "npm-run-all prepare test:*",
"test:tape": "node -r esm test.js"
"test": "npm-run-all test:*",
"test:tape": "ts-node -r esm test.js"
},

@@ -49,2 +52,3 @@ "devDependencies": {

"tape": "*",
"ts-node": "*",
"tslint": "*",

@@ -55,6 +59,6 @@ "typescript": "*",

"dependencies": {
"@turf/helpers": "^6.2.0-alpha.2",
"@turf/invariant": "^6.2.0-alpha.2"
"@turf/helpers": "^6.2.0-alpha.3",
"@turf/invariant": "^6.2.0-alpha.3"
},
"gitHead": "23d5cb91d77e0c1e2e903a2252f525797f1d0d09"
"gitHead": "dce9edfc705352e8cb9e0083c9330ba0e8d77409"
}
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