Socket
Socket
Sign inDemoInstall

@turf/bbox

Package Overview
Dependencies
Maintainers
4
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/bbox - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

index.d.ts

24

index.js

@@ -19,15 +19,19 @@ "use strict";

function bbox(geojson) {
var BBox = [Infinity, Infinity, -Infinity, -Infinity];
var result = [Infinity, Infinity, -Infinity, -Infinity];
meta_1.coordEach(geojson, function (coord) {
if (BBox[0] > coord[0])
BBox[0] = coord[0];
if (BBox[1] > coord[1])
BBox[1] = coord[1];
if (BBox[2] < coord[0])
BBox[2] = coord[0];
if (BBox[3] < coord[1])
BBox[3] = coord[1];
if (result[0] > coord[0]) {
result[0] = coord[0];
}
if (result[1] > coord[1]) {
result[1] = coord[1];
}
if (result[2] < coord[0]) {
result[2] = coord[0];
}
if (result[3] < coord[1]) {
result[3] = coord[1];
}
});
return BBox;
return result;
}
exports.default = bbox;
{
"name": "@turf/bbox",
"version": "6.0.0",
"version": "6.0.1",
"description": "turf bbox module",
"main": "index",
"types": "index.d.ts",
"files": [
"index.js",
"index.ts"
"index.d.ts"
],
"scripts": {
"prepare": "tsc",
"pretest": "tsc",

@@ -37,3 +39,5 @@ "test": "node test.js",

"typescript": "*",
"tape": "*"
"tape": "*",
"tslint": "*",
"@types/tape": "*"
},

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

@@ -11,3 +11,3 @@ # @turf/bbox

- `geojson` **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** any GeoJSON object
- `geojson` **[GeoJSON][1]** any GeoJSON object

@@ -25,4 +25,8 @@ **Examples**

Returns **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** bbox extent in [minX, minY, maxX, maxY] order
Returns **[BBox][2]** bbox extent in [minX, minY, maxX, maxY] order
[1]: https://tools.ietf.org/html/rfc7946#section-3
[2]: https://tools.ietf.org/html/rfc7946#section-5
<!-- This file is automatically generated. Please don't edit it directly:

@@ -29,0 +33,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