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.7.3 to 5.0.0

main.js

12

index.d.ts

@@ -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>;

@@ -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)&lt;any>)** input features
- `geojson` **[GeoJSON](http://geojson.org/geojson-spec.html#geojson-objects)** input features

@@ -12,0 +14,0 @@ **Examples**

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