New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@turf/within

Package Overview
Dependencies
Maintainers
4
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/within - npm Package Compare versions

Comparing version 4.5.2 to 4.6.0

80

index.js

@@ -12,64 +12,20 @@ var inside = require('@turf/inside');

* @example
* var searchWithin = {
* "type": "FeatureCollection",
* "features": [
* {
* "type": "Feature",
* "properties": {},
* "geometry": {
* "type": "Polygon",
* "coordinates": [[
* [-46.653,-23.543],
* [-46.634,-23.5346],
* [-46.613,-23.543],
* [-46.614,-23.559],
* [-46.631,-23.567],
* [-46.653,-23.560],
* [-46.653,-23.543]
* ]]
* }
* }
* ]
* };
* var points = {
* "type": "FeatureCollection",
* "features": [
* {
* "type": "Feature",
* "properties": {},
* "geometry": {
* "type": "Point",
* "coordinates": [-46.6318, -23.5523]
* }
* }, {
* "type": "Feature",
* "properties": {},
* "geometry": {
* "type": "Point",
* "coordinates": [-46.6246, -23.5325]
* }
* }, {
* "type": "Feature",
* "properties": {},
* "geometry": {
* "type": "Point",
* "coordinates": [-46.6062, -23.5513]
* }
* }, {
* "type": "Feature",
* "properties": {},
* "geometry": {
* "type": "Point",
* "coordinates": [-46.663, -23.554]
* }
* }, {
* "type": "Feature",
* "properties": {},
* "geometry": {
* "type": "Point",
* "coordinates": [-46.643, -23.557]
* }
* }
* ]
* };
* var searchWithin = turf.featureCollection([
* turf.polygon([[
* [-46.653,-23.543],
* [-46.634,-23.5346],
* [-46.613,-23.543],
* [-46.614,-23.559],
* [-46.631,-23.567],
* [-46.653,-23.560],
* [-46.653,-23.543]
* ]])
* ]);
* var points = turf.featureCollection([
* turf.point([-46.6318, -23.5523]),
* turf.point([-46.6246, -23.5325]),
* turf.point([-46.6062, -23.5513]),
* turf.point([-46.663, -23.554]),
* turf.point([-46.643, -23.557])
* ]);
*

@@ -76,0 +32,0 @@ * var ptsWithin = turf.within(points, searchWithin);

{
"name": "@turf/within",
"version": "4.5.2",
"version": "4.6.0",
"description": "turf within module",

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

"dependencies": {
"@turf/helpers": "^4.5.2",
"@turf/inside": "^4.5.2"
"@turf/helpers": "^4.6.0",
"@turf/inside": "^4.6.0"
}
}

@@ -15,64 +15,20 @@ # @turf/within

```javascript
var searchWithin = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[
[-46.653,-23.543],
[-46.634,-23.5346],
[-46.613,-23.543],
[-46.614,-23.559],
[-46.631,-23.567],
[-46.653,-23.560],
[-46.653,-23.543]
]]
}
}
]
};
var points = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-46.6318, -23.5523]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-46.6246, -23.5325]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-46.6062, -23.5513]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-46.663, -23.554]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [-46.643, -23.557]
}
}
]
};
var searchWithin = turf.featureCollection([
turf.polygon([[
[-46.653,-23.543],
[-46.634,-23.5346],
[-46.613,-23.543],
[-46.614,-23.559],
[-46.631,-23.567],
[-46.653,-23.560],
[-46.653,-23.543]
]])
]);
var points = turf.featureCollection([
turf.point([-46.6318, -23.5523]),
turf.point([-46.6246, -23.5325]),
turf.point([-46.6062, -23.5513]),
turf.point([-46.663, -23.554]),
turf.point([-46.643, -23.557])
]);

@@ -79,0 +35,0 @@ var ptsWithin = turf.within(points, searchWithin);

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