Socket
Socket
Sign inDemoInstall

turf-difference

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-difference - npm Package Compare versions

Comparing version 3.0.10 to 3.0.12

4

package.json
{
"name": "turf-difference",
"version": "3.0.10",
"version": "3.0.12",
"description": "[Turf](http://turfjs.org/) difference module",

@@ -30,4 +30,4 @@ "main": "index.js",

"jsts": "1.1.2",
"turf-helpers": "^3.0.10"
"turf-helpers": "^3.0.12"
}
}
# turf-difference
[![build status](https://secure.travis-ci.org/Turfjs/turf-difference.png)](http://travis-ci.org/Turfjs/turf-difference)
# difference
[Turf](http://turfjs.org/) difference module
### `turf.difference(poly1, poly2)`
Finds the difference between two Polygon|polygons by clipping the second
Finds the difference between two [polygons](Polygon) by clipping the second
polygon from the first.
**Parameters**
### Parameters
- `poly1` **Feature<Polygon>** input Polygon feaure
- `poly2` **Feature<Polygon>** Polygon feature to difference from `poly1`
| parameter | type | description |
| --------- | -------------------- | ------------------------------------------ |
| `poly1` | Feature\.\<Polygon\> | input Polygon feaure |
| `poly2` | Feature\.\<Polygon\> | Polygon feature to difference from `poly1` |
**Examples**
### Example
```js
```javascript
var poly1 = {

@@ -71,9 +62,15 @@ "type": "Feature",

Returns **Feature&lt;Polygon>** a Polygon feature showing the area of `poly1` excluding the area of `poly2`
**Returns** `Feature.<Polygon>`, a Polygon feature showing the area of `poly1` excluding the area of `poly2`
---
## 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

@@ -83,8 +80,6 @@ $ npm install turf-difference

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