@turf/bbox 7.1.0-alpha.70 → 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.
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +10 -10
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"names":[],"mappings":";
|
|
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"]}
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -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
|
-
* @
|
|
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
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -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
|
-
* @
|
|
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
|
package/dist/esm/index.js.map
CHANGED
|
@@ -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 * @
|
|
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.
|
|
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.
|
|
57
|
+
"@types/tape": "^4.13.4",
|
|
58
58
|
"benchmark": "^2.1.4",
|
|
59
59
|
"npm-run-all": "^4.1.5",
|
|
60
|
-
"tape": "^5.
|
|
61
|
-
"tsup": "^8.
|
|
62
|
-
"tsx": "^4.
|
|
63
|
-
"typescript": "^5.
|
|
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.
|
|
67
|
-
"@turf/meta": "^7.
|
|
66
|
+
"@turf/helpers": "^7.2.0",
|
|
67
|
+
"@turf/meta": "^7.2.0",
|
|
68
68
|
"@types/geojson": "^7946.0.10",
|
|
69
|
-
"tslib": "^2.
|
|
69
|
+
"tslib": "^2.8.1"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
|
|
72
72
|
}
|