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 5.1.5 to 6.0.0

index.ts

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"
}
}
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