@turf/boolean-contains
Advanced tools
Comparing version 6.2.0-alpha.2 to 6.2.0-alpha.3
@@ -131,6 +131,10 @@ import calcBbox from "@turf/bbox"; | ||
var coords = _a[_i]; | ||
if (isPointOnLine({ type: "Point", coordinates: coords }, lineString1, { ignoreEndVertices: true })) { | ||
if (isPointOnLine({ type: "Point", coordinates: coords }, lineString1, { | ||
ignoreEndVertices: true, | ||
})) { | ||
haveFoundInteriorPoint = true; | ||
} | ||
if (!isPointOnLine({ type: "Point", coordinates: coords }, lineString1, { ignoreEndVertices: false })) { | ||
if (!isPointOnLine({ type: "Point", coordinates: coords }, lineString1, { | ||
ignoreEndVertices: false, | ||
})) { | ||
return false; | ||
@@ -151,3 +155,5 @@ } | ||
var midPoint = getMidpoint(linestring.coordinates[i], linestring.coordinates[i + 1]); | ||
if (booleanPointInPolygon({ type: "Point", coordinates: midPoint }, polygon, { ignoreBoundary: true })) { | ||
if (booleanPointInPolygon({ type: "Point", coordinates: midPoint }, polygon, { | ||
ignoreBoundary: true, | ||
})) { | ||
output = true; | ||
@@ -154,0 +160,0 @@ break; |
@@ -141,6 +141,10 @@ "use strict"; | ||
var coords = _a[_i]; | ||
if (boolean_point_on_line_1.default({ type: "Point", coordinates: coords }, lineString1, { ignoreEndVertices: true })) { | ||
if (boolean_point_on_line_1.default({ type: "Point", coordinates: coords }, lineString1, { | ||
ignoreEndVertices: true, | ||
})) { | ||
haveFoundInteriorPoint = true; | ||
} | ||
if (!boolean_point_on_line_1.default({ type: "Point", coordinates: coords }, lineString1, { ignoreEndVertices: false })) { | ||
if (!boolean_point_on_line_1.default({ type: "Point", coordinates: coords }, lineString1, { | ||
ignoreEndVertices: false, | ||
})) { | ||
return false; | ||
@@ -162,3 +166,5 @@ } | ||
var midPoint = getMidpoint(linestring.coordinates[i], linestring.coordinates[i + 1]); | ||
if (boolean_point_in_polygon_1.default({ type: "Point", coordinates: midPoint }, polygon, { ignoreBoundary: true })) { | ||
if (boolean_point_in_polygon_1.default({ type: "Point", coordinates: midPoint }, polygon, { | ||
ignoreBoundary: true, | ||
})) { | ||
output = true; | ||
@@ -165,0 +171,0 @@ break; |
{ | ||
"name": "@turf/boolean-contains", | ||
"version": "6.2.0-alpha.2", | ||
"version": "6.2.0-alpha.3", | ||
"description": "turf boolean-contains module", | ||
@@ -30,2 +30,6 @@ "author": "Turf Authors", | ||
"module": "dist/es/index.js", | ||
"exports": { | ||
"import": "./dist/es/index.js", | ||
"require": "./dist/js/index.js" | ||
}, | ||
"types": "dist/js/index.d.ts", | ||
@@ -37,10 +41,9 @@ "sideEffects": false, | ||
"scripts": { | ||
"bench": "npm-run-all prepare bench:run", | ||
"bench:run": "node bench.js", | ||
"bench": "ts-node bench.js", | ||
"build": "npm-run-all build:*", | ||
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", | ||
"build:js": "tsc", | ||
"docs": "node ../../scripts/generate-readmes", | ||
"prepare": "npm-run-all prepare:*", | ||
"prepare:es": "tsc --outDir dist/es --module esnext --declaration false", | ||
"prepare:js": "tsc", | ||
"test": "npm-run-all prepare test:*", | ||
"test:tape": "node -r esm test.js" | ||
"test": "npm-run-all test:*", | ||
"test:tape": "ts-node -r esm test.js" | ||
}, | ||
@@ -56,2 +59,3 @@ "devDependencies": { | ||
"tape": "*", | ||
"ts-node": "*", | ||
"tslint": "*", | ||
@@ -61,9 +65,9 @@ "typescript": "*" | ||
"dependencies": { | ||
"@turf/bbox": "^6.2.0-alpha.2", | ||
"@turf/boolean-point-in-polygon": "^6.2.0-alpha.2", | ||
"@turf/boolean-point-on-line": "^6.2.0-alpha.2", | ||
"@turf/helpers": "^6.2.0-alpha.2", | ||
"@turf/invariant": "^6.2.0-alpha.2" | ||
"@turf/bbox": "^6.2.0-alpha.3", | ||
"@turf/boolean-point-in-polygon": "^6.2.0-alpha.3", | ||
"@turf/boolean-point-on-line": "^6.2.0-alpha.3", | ||
"@turf/helpers": "^6.2.0-alpha.3", | ||
"@turf/invariant": "^6.2.0-alpha.3" | ||
}, | ||
"gitHead": "23d5cb91d77e0c1e2e903a2252f525797f1d0d09" | ||
"gitHead": "dce9edfc705352e8cb9e0083c9330ba0e8d77409" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23101
7
512
11