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

turf-buffer

Package Overview
Dependencies
Maintainers
9
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-buffer - npm Package Compare versions

Comparing version 3.0.10 to 3.0.12

12

package.json
{
"name": "turf-buffer",
"version": "3.0.10",
"version": "3.0.12",
"description": "turf buffer module",

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

"tape": "^3.5.0",
"turf-distance": "^3.0.10",
"turf-bbox": "^3.0.10",
"turf-helpers": "^3.0.10"
"turf-distance": "^3.0.12",
"turf-bbox": "^3.0.12",
"turf-helpers": "^3.0.12"
},

@@ -40,5 +40,5 @@ "dependencies": {

"jsts": "1.1.2",
"turf-combine": "^3.0.10",
"turf-helpers": "^3.0.10"
"turf-combine": "^3.0.12",
"turf-helpers": "^3.0.12"
}
}
# turf-buffer
[![build status](https://secure.travis-ci.org/Turfjs/turf-buffer.png)](http://travis-ci.org/Turfjs/turf-buffer)
# buffer
turf buffer module
### `turf.buffer(feature, distance, unit)`
Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.
**Parameters**
### Parameters
- `feature` **(Feature | FeatureCollection)** input to be buffered
- `distance` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** distance to draw the buffer
- `unit` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** any of the options supported by turf units
| parameter | type | description |
| ---------- | -------------------------- | ----------------------------------------------------- |
| `feature` | Feature\,FeatureCollection | input to be buffered |
| `distance` | Number | distance to draw the buffer |
| `unit` | String | 'miles', 'feet', 'kilometers', 'meters', or 'degrees' |
**Examples**
### Example
```js
```javascript
var pt = {

@@ -41,9 +32,15 @@ "type": "Feature",

Returns **(FeatureCollection<Polygon> | FeatureCollection<MultiPolygon> | Polygon | MultiPolygon)** buffered features
**Returns** `FeatureCollection.<Polygon>,FeatureCollection.<MultiPolygon>,Polygon,MultiPolygon`, buffered features
---
## 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

@@ -53,8 +50,6 @@ $ npm install turf-buffer

## 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