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

@turf/clean-coords

Package Overview
Dependencies
Maintainers
0
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/clean-coords - npm Package Compare versions

Comparing version 7.1.0 to 7.2.0

2

dist/esm/index.d.ts
/**
* Removes redundant coordinates from any GeoJSON Geometry.
*
* @name cleanCoords
* @function
* @param {Geometry|Feature} geojson Feature or Geometry

@@ -6,0 +6,0 @@ * @param {Object} [options={}] Optional parameters

@@ -6,4 +6,3 @@ // index.ts

var mutate = typeof options === "object" ? options.mutate : options;
if (!geojson)
throw new Error("geojson is required");
if (!geojson) throw new Error("geojson is required");
var type = getType(geojson);

@@ -64,4 +63,3 @@ var newCoords = [];

var points = getCoords(line);
if (points.length === 2 && !equals(points[0], points[1]))
return points;
if (points.length === 2 && !equals(points[0], points[1])) return points;
var newPoints = [];

@@ -116,8 +114,6 @@ var secondToLast = points.length - 1;

var cross = dxc * dyl - dyc * dxl;
if (cross !== 0)
return false;
if (cross !== 0) return false;
else if (Math.abs(dxl) >= Math.abs(dyl))
return dxl > 0 ? startX <= x && x <= endX : endX <= x && x <= startX;
else
return dyl > 0 ? startY <= y && y <= endY : endY <= y && y <= startY;
else return dyl > 0 ? startY <= y && y <= endY : endY <= y && y <= startY;
}

@@ -124,0 +120,0 @@ var turf_clean_coords_default = cleanCoords;

{
"name": "@turf/clean-coords",
"version": "7.1.0",
"version": "7.2.0",
"description": "turf clean-coords module",

@@ -57,21 +57,21 @@ "author": "Turf Authors",

"devDependencies": {
"@turf/truncate": "^7.1.0",
"@turf/truncate": "^7.2.0",
"@types/benchmark": "^2.1.5",
"@types/tape": "^4.2.32",
"@types/tape": "^4.13.4",
"benchmark": "^2.1.4",
"load-json-file": "^7.0.1",
"npm-run-all": "^4.1.5",
"tape": "^5.7.2",
"tsup": "^8.0.1",
"tsx": "^4.6.2",
"typescript": "^5.2.2",
"tape": "^5.9.0",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.5.4",
"write-json-file": "^5.0.0"
},
"dependencies": {
"@turf/helpers": "^7.1.0",
"@turf/invariant": "^7.1.0",
"@turf/helpers": "^7.2.0",
"@turf/invariant": "^7.2.0",
"@types/geojson": "^7946.0.10",
"tslib": "^2.6.2"
"tslib": "^2.8.1"
},
"gitHead": "68915eeebc9278bb40dec3f1034499698a0561ef"
"gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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