@turf/boolean-intersects 6.5.0 → 7.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/es/index.js +3 -3
- package/dist/js/index.d.ts +1 -1
- package/dist/js/index.js +6 -8
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
Boolean-intersects returns (TRUE) two geometries intersect.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### Parameters
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* `feature1` **([Geometry][1] | [Feature][2]\<any>)** GeoJSON Feature or Geometry
|
|
12
|
+
* `feature2` **([Geometry][1] | [Feature][2]\<any>)** GeoJSON Feature or Geometry
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
### Examples
|
|
15
15
|
|
|
16
16
|
```javascript
|
|
17
17
|
var point = turf.point([2, 2]);
|
package/dist/es/index.js
CHANGED
|
@@ -15,9 +15,9 @@ import { flattenEach } from "@turf/meta";
|
|
|
15
15
|
* //=true
|
|
16
16
|
*/
|
|
17
17
|
export default function booleanIntersects(feature1, feature2) {
|
|
18
|
-
|
|
19
|
-
flattenEach(feature1,
|
|
20
|
-
flattenEach(feature2,
|
|
18
|
+
let bool = false;
|
|
19
|
+
flattenEach(feature1, (flatten1) => {
|
|
20
|
+
flattenEach(feature2, (flatten2) => {
|
|
21
21
|
if (bool === true) {
|
|
22
22
|
return true;
|
|
23
23
|
}
|
package/dist/js/index.d.ts
CHANGED
package/dist/js/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const boolean_disjoint_1 = tslib_1.__importDefault(require("@turf/boolean-disjoint"));
|
|
5
|
+
const meta_1 = require("@turf/meta");
|
|
8
6
|
/**
|
|
9
7
|
* Boolean-intersects returns (TRUE) two geometries intersect.
|
|
10
8
|
*
|
|
@@ -20,9 +18,9 @@ var meta_1 = require("@turf/meta");
|
|
|
20
18
|
* //=true
|
|
21
19
|
*/
|
|
22
20
|
function booleanIntersects(feature1, feature2) {
|
|
23
|
-
|
|
24
|
-
meta_1.flattenEach(feature1,
|
|
25
|
-
meta_1.flattenEach(feature2,
|
|
21
|
+
let bool = false;
|
|
22
|
+
meta_1.flattenEach(feature1, (flatten1) => {
|
|
23
|
+
meta_1.flattenEach(feature2, (flatten2) => {
|
|
26
24
|
if (bool === true) {
|
|
27
25
|
return true;
|
|
28
26
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/boolean-intersects",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-alpha.0",
|
|
4
4
|
"description": "turf boolean-intersects module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -61,9 +61,10 @@
|
|
|
61
61
|
"typescript": "*"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@turf/boolean-disjoint": "^
|
|
65
|
-
"@turf/helpers": "^
|
|
66
|
-
"@turf/meta": "^
|
|
64
|
+
"@turf/boolean-disjoint": "^7.0.0-alpha.0",
|
|
65
|
+
"@turf/helpers": "^7.0.0-alpha.0",
|
|
66
|
+
"@turf/meta": "^7.0.0-alpha.0",
|
|
67
|
+
"tslib": "^2.3.0"
|
|
67
68
|
},
|
|
68
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189"
|
|
69
70
|
}
|