@turf/envelope
Advanced tools
Comparing version 4.7.3 to 5.0.0
@@ -1,12 +0,8 @@ | ||
/// <reference types="geojson" /> | ||
import { Feature, AllGeoJSON, Polygon } from '@turf/helpers' | ||
type Feature = GeoJSON.Feature<any>; | ||
type Features = GeoJSON.FeatureCollection<any>; | ||
type Polygon = GeoJSON.Feature<GeoJSON.Polygon>; | ||
/** | ||
* http://turfjs.org/docs/#envelope | ||
*/ | ||
declare function envelope(features: Feature | Features): Polygon; | ||
declare namespace envelope { } | ||
export = envelope; | ||
export default function envelope( | ||
features: AllGeoJSON | ||
): Feature<Polygon>; |
12
index.js
@@ -1,3 +0,3 @@ | ||
var bbox = require('@turf/bbox'); | ||
var bboxPolygon = require('@turf/bbox-polygon'); | ||
import bbox from '@turf/bbox'; | ||
import bboxPolygon from '@turf/bbox-polygon'; | ||
@@ -8,3 +8,3 @@ /** | ||
* @name envelope | ||
* @param {FeatureCollection|Feature<any>} geojson input features | ||
* @param {GeoJSON} geojson input features | ||
* @returns {Feature<Polygon>} a rectangular Polygon feature that encompasses all vertices | ||
@@ -23,4 +23,6 @@ * @example | ||
*/ | ||
module.exports = function (geojson) { | ||
function envelope(geojson) { | ||
return bboxPolygon(bbox(geojson)); | ||
}; | ||
} | ||
export default envelope; |
{ | ||
"name": "@turf/envelope", | ||
"version": "4.7.3", | ||
"version": "5.0.0", | ||
"description": "turf envelope module", | ||
"main": "index.js", | ||
"main": "main", | ||
"module": "index", | ||
"jsnext:main": "index", | ||
"types": "index.d.ts", | ||
"files": [ | ||
"index.js", | ||
"index.d.ts" | ||
"index.d.ts", | ||
"main.js" | ||
], | ||
"scripts": { | ||
"test": "node test.js", | ||
"bench": "node bench.js" | ||
"pretest": "rollup -c ../../rollup.config.js", | ||
"test": "node -r @std/esm test.js", | ||
"bench": "node -r @std/esm bench.js" | ||
}, | ||
@@ -33,9 +37,17 @@ "repository": { | ||
"devDependencies": { | ||
"benchmark": "^2.1.4", | ||
"tape": "^4.6.3" | ||
"benchmark": "*", | ||
"load-json-file": "*", | ||
"rollup": "*", | ||
"tape": "*", | ||
"@std/esm": "*" | ||
}, | ||
"dependencies": { | ||
"@turf/bbox": "^4.7.3", | ||
"@turf/bbox-polygon": "^4.7.3" | ||
"@turf/bbox": "^5.0.0", | ||
"@turf/bbox-polygon": "^5.0.0", | ||
"@turf/helpers": "^5.0.0" | ||
}, | ||
"@std/esm": { | ||
"esm": "js", | ||
"cjs": true | ||
} | ||
} |
# @turf/envelope | ||
# envelope | ||
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> | ||
## envelope | ||
Takes any number of features and returns a rectangular [Polygon](http://geojson.org/geojson-spec.html#polygon) that encompasses all vertices. | ||
@@ -9,3 +11,3 @@ | ||
- `geojson` **([FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects) \| [Feature](http://geojson.org/geojson-spec.html#feature-objects)<any>)** input features | ||
- `geojson` **[GeoJSON](http://geojson.org/geojson-spec.html#geojson-objects)** input features | ||
@@ -12,0 +14,0 @@ **Examples** |
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
5662
6
58
54
3
5
+ Added@turf/helpers@^5.0.0
+ Added@turf/bbox@5.1.5(transitive)
+ Added@turf/bbox-polygon@5.1.5(transitive)
+ Added@turf/helpers@5.1.5(transitive)
+ Added@turf/meta@5.2.0(transitive)
- Removed@turf/bbox@4.7.3(transitive)
- Removed@turf/bbox-polygon@4.7.3(transitive)
- Removed@turf/helpers@4.7.3(transitive)
- Removed@turf/meta@4.7.4(transitive)
Updated@turf/bbox@^5.0.0
Updated@turf/bbox-polygon@^5.0.0