Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turf/envelope

Package Overview
Dependencies
Maintainers
4
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/envelope - npm Package Compare versions

Comparing version 4.5.2 to 4.6.0

43

index.js

@@ -9,37 +9,9 @@ var bbox = require('@turf/bbox');

* @param {FeatureCollection|Feature<any>} geojson input features
* @return {Feature<Polygon>} a rectangular Polygon feature that encompasses all vertices
* @returns {Feature<Polygon>} a rectangular Polygon feature that encompasses all vertices
* @example
* var features = {
* "type": "FeatureCollection",
* "features": [
* {
* "type": "Feature",
* "properties": {
* "name": "Location A"
* },
* "geometry": {
* "type": "Point",
* "coordinates": [-75.343, 39.984]
* }
* }, {
* "type": "Feature",
* "properties": {
* "name": "Location B"
* },
* "geometry": {
* "type": "Point",
* "coordinates": [-75.833, 39.284]
* }
* }, {
* "type": "Feature",
* "properties": {
* "name": "Location C"
* },
* "geometry": {
* "type": "Point",
* "coordinates": [-75.534, 39.123]
* }
* }
* ]
* };
* var features = turf.featureCollection([
* turf.point([-75.343, 39.984], {"name": "Location A"}),
* turf.point([-75.833, 39.284], {"name": "Location B"}),
* turf.point([-75.534, 39.123], {"name": "Location C"})
* ]);
*

@@ -49,7 +21,6 @@ * var enveloped = turf.envelope(features);

* //addToMap
* var addToMap = [features, enveloped]
* var addToMap = [features, enveloped];
*/
module.exports = function (geojson) {
return bboxPolygon(bbox(geojson));
};

6

package.json
{
"name": "@turf/envelope",
"version": "4.5.2",
"version": "4.6.0",
"description": "turf envelope module",

@@ -37,5 +37,5 @@ "main": "index.js",

"dependencies": {
"@turf/bbox": "^4.5.2",
"@turf/bbox-polygon": "^4.5.2"
"@turf/bbox": "^4.6.0",
"@turf/bbox-polygon": "^4.6.0"
}
}

@@ -14,35 +14,7 @@ # @turf/envelope

```javascript
var features = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Location A"
},
"geometry": {
"type": "Point",
"coordinates": [-75.343, 39.984]
}
}, {
"type": "Feature",
"properties": {
"name": "Location B"
},
"geometry": {
"type": "Point",
"coordinates": [-75.833, 39.284]
}
}, {
"type": "Feature",
"properties": {
"name": "Location C"
},
"geometry": {
"type": "Point",
"coordinates": [-75.534, 39.123]
}
}
]
};
var features = turf.featureCollection([
turf.point([-75.343, 39.984], {"name": "Location A"}),
turf.point([-75.833, 39.284], {"name": "Location B"}),
turf.point([-75.534, 39.123], {"name": "Location C"})
]);

@@ -52,3 +24,3 @@ var enveloped = turf.envelope(features);

//addToMap
var addToMap = [features, enveloped]
var addToMap = [features, enveloped];
```

@@ -55,0 +27,0 @@

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