Socket
Socket
Sign inDemoInstall

turf-envelope

Package Overview
Dependencies
Maintainers
1
Versions
12
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 0.1.1 to 1.0.0

bench.js

10

index.js

@@ -1,8 +0,8 @@

var extent = require('turf-extent')
var bboxPolygon = require('turf-bbox-polygon')
var extent = require('turf-extent');
var bboxPolygon = require('turf-bbox-polygon');
module.exports = function(features, done){
var bbox = extent(features)
var poly = bboxPolygon(bbox)
return poly
var bbox = extent(features);
var poly = bboxPolygon(bbox);
return poly;
}
{
"name": "turf-envelope",
"version": "0.1.1",
"version": "1.0.0",
"description": "turf envelope module",

@@ -27,8 +27,9 @@ "main": "index.js",

"devDependencies": {
"tape": "^2.12.3"
"benchmark": "^1.0.0",
"tape": "^2.13.3"
},
"dependencies": {
"turf-bbox-polygon": "^0.1.0",
"turf-extent": "^0.1.1"
"turf-bbox-polygon": "^0.1.5",
"turf-extent": "^0.1.3"
}
}

@@ -7,2 +7,22 @@ turf-envelope

###Install
```sh
npm install turf-envelope
```
###Parameters
|name|description|
|---|---|
|fc|A FeatureCollection|
###Usage
```js
envelope(fc)
```
###Example
```javascript

@@ -9,0 +29,0 @@ var envelope = require('turf-envelope')

@@ -1,10 +0,10 @@

var test = require('tape')
var envelope = require('./')
var fc = require('./geojson/fc.js')
var test = require('tape');
var envelope = require('./');
var fc = require('./geojson/fc.js');
test('envelope', function(t){
var enveloped = envelope(fc)
t.ok(enveloped, 'should return a polygon that represents the bbox around a feature or feature collection')
t.equal(enveloped.geometry.type, 'Polygon')
t.end()
var enveloped = envelope(fc);
t.ok(enveloped, 'should return a polygon that represents the bbox around a feature or feature collection');
t.equal(enveloped.geometry.type, 'Polygon');
t.end();
})
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