@turf/bbox
Advanced tools
Comparing version 5.1.5 to 6.0.0
22
index.js
@@ -1,3 +0,4 @@ | ||
import { coordEach } from '@turf/meta'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var meta_1 = require("@turf/meta"); | ||
/** | ||
@@ -19,11 +20,14 @@ * Takes a set of features, calculates the bbox of all input features, and returns a bounding box. | ||
var BBox = [Infinity, Infinity, -Infinity, -Infinity]; | ||
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]; | ||
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]; | ||
}); | ||
return BBox; | ||
} | ||
export default bbox; | ||
exports.default = bbox; |
{ | ||
"name": "@turf/bbox", | ||
"version": "5.1.5", | ||
"version": "6.0.0", | ||
"description": "turf bbox module", | ||
"main": "main.js", | ||
"module": "main.es.js", | ||
"types": "index.d.ts", | ||
"main": "index", | ||
"files": [ | ||
"index.js", | ||
"index.d.ts", | ||
"main.js", | ||
"main.es.js" | ||
"index.ts" | ||
], | ||
"scripts": { | ||
"pretest": "rollup -c ../../rollup.config.js", | ||
"test": "node -r @std/esm test.js", | ||
"posttest": "node -r @std/esm ../../scripts/validate-es5-dependencies.js", | ||
"bench": "node -r @std/esm bench.js", | ||
"pretest": "tsc", | ||
"test": "node test.js", | ||
"bench": "node bench.js", | ||
"docs": "node ../../scripts/generate-readmes" | ||
@@ -40,15 +35,10 @@ }, | ||
"devDependencies": { | ||
"@std/esm": "*", | ||
"benchmark": "*", | ||
"rollup": "*", | ||
"typescript": "*", | ||
"tape": "*" | ||
}, | ||
"dependencies": { | ||
"@turf/helpers": "^5.1.5", | ||
"@turf/meta": "^5.1.5" | ||
}, | ||
"@std/esm": { | ||
"esm": "js", | ||
"cjs": true | ||
"@turf/helpers": "6.x", | ||
"@turf/meta": "6.x" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
5121
5
59
+ Added@turf/helpers@6.5.0(transitive)
+ Added@turf/meta@6.5.0(transitive)
- Removed@turf/helpers@5.1.5(transitive)
- Removed@turf/meta@5.2.0(transitive)
Updated@turf/helpers@6.x
Updated@turf/meta@6.x