Socket
Socket
Sign inDemoInstall

turf-inside

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-inside - npm Package Compare versions

Comparing version 3.0.10 to 3.0.12

6

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

@@ -28,3 +28,3 @@ "main": "index.js",

"dependencies": {
"turf-invariant": "^3.0.10"
"turf-invariant": "^3.0.12"
},

@@ -34,4 +34,4 @@ "devDependencies": {

"tape": "^3.5.0",
"turf-helpers": "^3.0.10"
"turf-helpers": "^3.0.12"
}
}
# turf-inside
[![build status](https://secure.travis-ci.org/Turfjs/turf-inside.png)](http://travis-ci.org/Turfjs/turf-inside)
# inside
turf inside module
### `turf.inside(point, polygon)`
Takes a Point and a Polygon or MultiPolygon and determines if the point resides inside the polygon. The polygon can
Takes a [Point](Point) and a [Polygon](Polygon) or [MultiPolygon](MultiPolygon) and determines if the point resides inside the polygon. The polygon can
be convex or concave. The function accounts for holes.
**Parameters**
### Parameters
- `point` **Feature<Point>** input point
- `polygon` **Feature<(Polygon | MultiPolygon)>** input polygon or multipolygon
| parameter | type | description |
| --------- | --------------------------------- | ----------------------------- |
| `point` | Feature\.\<Point\> | input point |
| `polygon` | Feature\.\<Polygon|MultiPolygon\> | input polygon or multipolygon |
**Examples**
### Example
```js
```javascript
var pt1 = {

@@ -74,9 +65,15 @@ "type": "Feature",

Returns **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon
**Returns** `Boolean`, `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon
---
## 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

@@ -86,8 +83,6 @@ $ npm install turf-inside

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