Socket
Socket
Sign inDemoInstall

turf-convex

Package Overview
Dependencies
Maintainers
9
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-convex - npm Package Compare versions

Comparing version 3.0.10 to 3.0.12

6

index.js

@@ -14,3 +14,3 @@ var each = require('turf-meta').coordEach,

* @name convex
* @param {FeatureCollection<Point>} input input points
* @param {FeatureCollection<Point>} featurecollection input points
* @returns {Feature<Polygon>} a convex hull

@@ -77,5 +77,5 @@ * @example

*/
module.exports = function (fc) {
module.exports = function (featurecollection) {
var points = [];
each(fc, function (coord) { points.push(coord); });
each(featurecollection, function (coord) { points.push(coord); });
var hull = convexHull(points);

@@ -82,0 +82,0 @@ if (hull.length > 0) {

{
"name": "turf-convex",
"version": "3.0.10",
"version": "3.0.12",
"description": "",

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

"convex-hull": "^1.0.3",
"turf-meta": "^3.0.10",
"turf-helpers": "^3.0.10"
"turf-meta": "^3.0.12",
"turf-helpers": "^3.0.12"
}
}
# turf-convex
[![build status](https://secure.travis-ci.org/Turfjs/turf-convex.png)](http://travis-ci.org/Turfjs/turf-convex)
# convex
### `turf.convex(input)`
Takes a set of Point|points and returns a
Takes a set of [points](Point) and returns a
[convex hull](http://en.wikipedia.org/wiki/Convex_hull) polygon.

@@ -17,13 +12,9 @@

**Parameters**
### Parameters
- `featurecollection` **FeatureCollection&lt;Point>** input points
| parameter | type | description |
| --------- | ---------------------------- | ------------ |
| `input` | FeatureCollection\.\<Point\> | input points |
**Examples**
### Example
```js
```javascript
var points = {

@@ -89,9 +80,15 @@ "type": "FeatureCollection",

Returns **Feature&lt;Polygon>** a convex hull
**Returns** `Feature.<Polygon>`, a convex hull
---
## Installation
This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.
Requires [nodejs](http://nodejs.org/).
### Installation
Install this module individually:
```sh

@@ -101,8 +98,6 @@ $ npm install turf-convex

## Tests
Or install the Turf module that includes it as a function:
```sh
$ npm test
$ npm install turf
```
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