@turf/bbox 7.1.0 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":[],"mappings":";AAEA,SAAS,iBAAiB;AAmB1B,SAAS,KACP,SACA,UAEI,CAAC,GACC;AACN,MAAI,QAAQ,QAAQ,QAAQ,SAAS,QAAQ,WAAW;AACtD,WAAO,QAAQ;AAAA,EACjB;AACA,QAAM,SAAe,CAAC,UAAU,UAAU,WAAW,SAAS;AAC9D,YAAU,SAAS,CAAC,UAAU;AAC5B,QAAI,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG;AACxB,aAAO,CAAC,IAAI,MAAM,CAAC;AAAA,IACrB;AACA,QAAI,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG;AACxB,aAAO,CAAC,IAAI,MAAM,CAAC;AAAA,IACrB;AACA,QAAI,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG;AACxB,aAAO,CAAC,IAAI,MAAM,CAAC;AAAA,IACrB;AACA,QAAI,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG;AACxB,aAAO,CAAC,IAAI,MAAM,CAAC;AAAA,IACrB;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAGA,IAAO,oBAAQ","sourcesContent":["import { BBox } from \"geojson\";\nimport { AllGeoJSON } from \"@turf/helpers\";\nimport { coordEach } from \"@turf/meta\";\n\n/**\n * Calculates the bounding box for any GeoJSON object, including FeatureCollection.\n * Uses geojson.bbox if available and options.recompute is not set.\n *\n * @name bbox\n * @param {GeoJSON} geojson any GeoJSON object\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.recompute] Whether to ignore an existing bbox property on geojson\n * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\n * var bbox = turf.bbox(line);\n * var bboxPolygon = turf.bboxPolygon(bbox);\n *\n * //addToMap\n * var addToMap = [line, bboxPolygon]\n */\nfunction bbox(\n geojson: AllGeoJSON,\n options: {\n recompute?: boolean;\n } = {}\n): BBox {\n if (geojson.bbox != null && true !== options.recompute) {\n return geojson.bbox;\n }\n const result: BBox = [Infinity, Infinity, -Infinity, -Infinity];\n coordEach(geojson, (coord) => {\n if (result[0] > coord[0]) {\n result[0] = coord[0];\n }\n if (result[1] > coord[1]) {\n result[1] = coord[1];\n }\n if (result[2] < coord[0]) {\n result[2] = coord[0];\n }\n if (result[3] < coord[1]) {\n result[3] = coord[1];\n }\n });\n return result;\n}\n\nexport { bbox };\nexport default bbox;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-bbox/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACEA,kCAA0B;AAmB1B,SAAS,IAAA,CACP,OAAA,EACA,QAAA,EAEI,CAAC,CAAA,EACC;AACN,EAAA,GAAA,CAAI,OAAA,CAAQ,KAAA,GAAQ,KAAA,GAAQ,KAAA,IAAS,OAAA,CAAQ,SAAA,EAAW;AACtD,IAAA,OAAO,OAAA,CAAQ,IAAA;AAAA,EACjB;AACA,EAAA,MAAM,OAAA,EAAe,CAAC,QAAA,EAAU,QAAA,EAAU,CAAA,QAAA,EAAW,CAAA,QAAS,CAAA;AAC9D,EAAA,6BAAA,OAAU,EAAS,CAAC,KAAA,EAAA,GAAU;AAC5B,IAAA,GAAA,CAAI,MAAA,CAAO,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAG;AACxB,MAAA,MAAA,CAAO,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA;AAAA,IACrB;AACA,IAAA,GAAA,CAAI,MAAA,CAAO,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAG;AACxB,MAAA,MAAA,CAAO,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA;AAAA,IACrB;AACA,IAAA,GAAA,CAAI,MAAA,CAAO,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAG;AACxB,MAAA,MAAA,CAAO,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA;AAAA,IACrB;AACA,IAAA,GAAA,CAAI,MAAA,CAAO,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAG;AACxB,MAAA,MAAA,CAAO,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA;AAAA,IACrB;AAAA,EACF,CAAC,CAAA;AACD,EAAA,OAAO,MAAA;AACT;AAGA,IAAO,kBAAA,EAAQ,IAAA;ADzBf;AACE;AACA;AACF,yDAAC","file":"/home/runner/work/turf/turf/packages/turf-bbox/dist/cjs/index.cjs","sourcesContent":[null,"import { BBox } from \"geojson\";\nimport { AllGeoJSON } from \"@turf/helpers\";\nimport { coordEach } from \"@turf/meta\";\n\n/**\n * Calculates the bounding box for any GeoJSON object, including FeatureCollection.\n * Uses geojson.bbox if available and options.recompute is not set.\n *\n * @function\n * @param {GeoJSON} geojson any GeoJSON object\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.recompute] Whether to ignore an existing bbox property on geojson\n * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\n * var bbox = turf.bbox(line);\n * var bboxPolygon = turf.bboxPolygon(bbox);\n *\n * //addToMap\n * var addToMap = [line, bboxPolygon]\n */\nfunction bbox(\n geojson: AllGeoJSON,\n options: {\n recompute?: boolean;\n } = {}\n): BBox {\n if (geojson.bbox != null && true !== options.recompute) {\n return geojson.bbox;\n }\n const result: BBox = [Infinity, Infinity, -Infinity, -Infinity];\n coordEach(geojson, (coord) => {\n if (result[0] > coord[0]) {\n result[0] = coord[0];\n }\n if (result[1] > coord[1]) {\n result[1] = coord[1];\n }\n if (result[2] < coord[0]) {\n result[2] = coord[0];\n }\n if (result[3] < coord[1]) {\n result[3] = coord[1];\n }\n });\n return result;\n}\n\nexport { bbox };\nexport default bbox;\n"]}
@@ -5,7 +5,7 @@ import { AllGeoJSON } from '@turf/helpers';
5
5
  * Calculates the bounding box for any GeoJSON object, including FeatureCollection.
6
6
  * Uses geojson.bbox if available and options.recompute is not set.
7
7
  *
8
- * @name bbox
8
+ * @function
9
9
  * @param {GeoJSON} geojson any GeoJSON object
10
10
  * @param {Object} [options={}] Optional parameters
11
11
  * @param {boolean} [options.recompute] Whether to ignore an existing bbox property on geojson
@@ -5,7 +5,7 @@ import { AllGeoJSON } from '@turf/helpers';
5
5
  * Calculates the bounding box for any GeoJSON object, including FeatureCollection.
6
6
  * Uses geojson.bbox if available and options.recompute is not set.
7
7
  *
8
- * @name bbox
8
+ * @function
9
9
  * @param {GeoJSON} geojson any GeoJSON object
10
10
  * @param {Object} [options={}] Optional parameters
11
11
  * @param {boolean} [options.recompute] Whether to ignore an existing bbox property on geojson
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { BBox } from \"geojson\";\nimport { AllGeoJSON } from \"@turf/helpers\";\nimport { coordEach } from \"@turf/meta\";\n\n/**\n * Calculates the bounding box for any GeoJSON object, including FeatureCollection.\n * Uses geojson.bbox if available and options.recompute is not set.\n *\n * @name bbox\n * @param {GeoJSON} geojson any GeoJSON object\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.recompute] Whether to ignore an existing bbox property on geojson\n * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\n * var bbox = turf.bbox(line);\n * var bboxPolygon = turf.bboxPolygon(bbox);\n *\n * //addToMap\n * var addToMap = [line, bboxPolygon]\n */\nfunction bbox(\n geojson: AllGeoJSON,\n options: {\n recompute?: boolean;\n } = {}\n): BBox {\n if (geojson.bbox != null && true !== options.recompute) {\n return geojson.bbox;\n }\n const result: BBox = [Infinity, Infinity, -Infinity, -Infinity];\n coordEach(geojson, (coord) => {\n if (result[0] > coord[0]) {\n result[0] = coord[0];\n }\n if (result[1] > coord[1]) {\n result[1] = coord[1];\n }\n if (result[2] < coord[0]) {\n result[2] = coord[0];\n }\n if (result[3] < coord[1]) {\n result[3] = coord[1];\n }\n });\n return result;\n}\n\nexport { bbox };\nexport default bbox;\n"],"mappings":";AAEA,SAAS,iBAAiB;AAmB1B,SAAS,KACP,SACA,UAEI,CAAC,GACC;AACN,MAAI,QAAQ,QAAQ,QAAQ,SAAS,QAAQ,WAAW;AACtD,WAAO,QAAQ;AAAA,EACjB;AACA,QAAM,SAAe,CAAC,UAAU,UAAU,WAAW,SAAS;AAC9D,YAAU,SAAS,CAAC,UAAU;AAC5B,QAAI,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG;AACxB,aAAO,CAAC,IAAI,MAAM,CAAC;AAAA,IACrB;AACA,QAAI,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG;AACxB,aAAO,CAAC,IAAI,MAAM,CAAC;AAAA,IACrB;AACA,QAAI,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG;AACxB,aAAO,CAAC,IAAI,MAAM,CAAC;AAAA,IACrB;AACA,QAAI,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG;AACxB,aAAO,CAAC,IAAI,MAAM,CAAC;AAAA,IACrB;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAGA,IAAO,oBAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { BBox } from \"geojson\";\nimport { AllGeoJSON } from \"@turf/helpers\";\nimport { coordEach } from \"@turf/meta\";\n\n/**\n * Calculates the bounding box for any GeoJSON object, including FeatureCollection.\n * Uses geojson.bbox if available and options.recompute is not set.\n *\n * @function\n * @param {GeoJSON} geojson any GeoJSON object\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.recompute] Whether to ignore an existing bbox property on geojson\n * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\n * var bbox = turf.bbox(line);\n * var bboxPolygon = turf.bboxPolygon(bbox);\n *\n * //addToMap\n * var addToMap = [line, bboxPolygon]\n */\nfunction bbox(\n geojson: AllGeoJSON,\n options: {\n recompute?: boolean;\n } = {}\n): BBox {\n if (geojson.bbox != null && true !== options.recompute) {\n return geojson.bbox;\n }\n const result: BBox = [Infinity, Infinity, -Infinity, -Infinity];\n coordEach(geojson, (coord) => {\n if (result[0] > coord[0]) {\n result[0] = coord[0];\n }\n if (result[1] > coord[1]) {\n result[1] = coord[1];\n }\n if (result[2] < coord[0]) {\n result[2] = coord[0];\n }\n if (result[3] < coord[1]) {\n result[3] = coord[1];\n }\n });\n return result;\n}\n\nexport { bbox };\nexport default bbox;\n"],"mappings":";AAEA,SAAS,iBAAiB;AAmB1B,SAAS,KACP,SACA,UAEI,CAAC,GACC;AACN,MAAI,QAAQ,QAAQ,QAAQ,SAAS,QAAQ,WAAW;AACtD,WAAO,QAAQ;AAAA,EACjB;AACA,QAAM,SAAe,CAAC,UAAU,UAAU,WAAW,SAAS;AAC9D,YAAU,SAAS,CAAC,UAAU;AAC5B,QAAI,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG;AACxB,aAAO,CAAC,IAAI,MAAM,CAAC;AAAA,IACrB;AACA,QAAI,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG;AACxB,aAAO,CAAC,IAAI,MAAM,CAAC;AAAA,IACrB;AACA,QAAI,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG;AACxB,aAAO,CAAC,IAAI,MAAM,CAAC;AAAA,IACrB;AACA,QAAI,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG;AACxB,aAAO,CAAC,IAAI,MAAM,CAAC;AAAA,IACrB;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAGA,IAAO,oBAAQ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/bbox",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "turf bbox module",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
@@ -54,19 +54,19 @@
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/benchmark": "^2.1.5",
57
- "@types/tape": "^4.2.32",
57
+ "@types/tape": "^4.13.4",
58
58
  "benchmark": "^2.1.4",
59
59
  "npm-run-all": "^4.1.5",
60
- "tape": "^5.7.2",
61
- "tsup": "^8.0.1",
62
- "tsx": "^4.6.2",
63
- "typescript": "^5.2.2"
60
+ "tape": "^5.9.0",
61
+ "tsup": "^8.3.5",
62
+ "tsx": "^4.19.2",
63
+ "typescript": "^5.5.4"
64
64
  },
65
65
  "dependencies": {
66
- "@turf/helpers": "^7.1.0",
67
- "@turf/meta": "^7.1.0",
66
+ "@turf/helpers": "^7.2.0",
67
+ "@turf/meta": "^7.2.0",
68
68
  "@types/geojson": "^7946.0.10",
69
- "tslib": "^2.6.2"
69
+ "tslib": "^2.8.1"
70
70
  },
71
- "gitHead": "68915eeebc9278bb40dec3f1034499698a0561ef"
71
+ "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
72
72
  }