turf-envelope
Advanced tools
Comparing version 0.1.1 to 1.0.0
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') |
14
test.js
@@ -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(); | ||
}) |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4882
9
67
0
40
2
1
Updatedturf-bbox-polygon@^0.1.5
Updatedturf-extent@^0.1.3