@turf/boolean-equal 7.1.0 → 7.3.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/dist/cjs/index.cjs +3 -4
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +3 -4
- package/dist/esm/index.js.map +1 -1
- package/package.json +13 -13
package/dist/cjs/index.cjs
CHANGED
|
@@ -10,15 +10,14 @@ function booleanEqual(feature1, feature2, options = {}) {
|
|
|
10
10
|
}
|
|
11
11
|
const type1 = _invariant.getGeom.call(void 0, feature1).type;
|
|
12
12
|
const type2 = _invariant.getGeom.call(void 0, feature2).type;
|
|
13
|
-
if (type1 !== type2)
|
|
14
|
-
return false;
|
|
13
|
+
if (type1 !== type2) return false;
|
|
15
14
|
return _geojsonequalityts.geojsonEquality.call(void 0, _cleancoords.cleanCoords.call(void 0, feature1), _cleancoords.cleanCoords.call(void 0, feature2), {
|
|
16
15
|
precision
|
|
17
16
|
});
|
|
18
17
|
}
|
|
19
|
-
var
|
|
18
|
+
var index_default = booleanEqual;
|
|
20
19
|
|
|
21
20
|
|
|
22
21
|
|
|
23
|
-
exports.booleanEqual = booleanEqual; exports.default =
|
|
22
|
+
exports.booleanEqual = booleanEqual; exports.default = index_default;
|
|
24
23
|
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-equal/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACCA,wDAAgC;AAChC,iDAA4B;AAC5B,4CAAwB;AAsBxB,SAAS,YAAA,CACP,QAAA,EACA,QAAA,EACA,QAAA,EAEI,CAAC,CAAA,EACI;AACT,EAAA,IAAI,UAAA,EAAY,OAAA,CAAQ,SAAA;AAExB,EAAA,UAAA,EACE,UAAA,IAAc,KAAA,EAAA,GAAa,UAAA,IAAc,KAAA,GAAQ,KAAA,CAAM,SAAS,EAAA,EAC5D,EAAA,EACA,SAAA;AAEN,EAAA,GAAA,CAAI,OAAO,UAAA,IAAc,SAAA,GAAY,CAAA,CAAE,UAAA,GAAa,CAAA,CAAA,EAAI;AACtD,IAAA,MAAM,IAAI,KAAA,CAAM,qCAAqC,CAAA;AAAA,EACvD;AAEA,EAAA,MAAM,MAAA,EAAQ,gCAAA,QAAgB,CAAA,CAAE,IAAA;AAChC,EAAA,MAAM,MAAA,EAAQ,gCAAA,QAAgB,CAAA,CAAE,IAAA;AAChC,EAAA,GAAA,CAAI,MAAA,IAAU,KAAA,EAAO,OAAO,KAAA;AAE5B,EAAA,OAAO,gDAAA,sCAAgB,QAAoB,CAAA,EAAG,sCAAA,QAAoB,CAAA,EAAG;AAAA,IACnE;AAAA,EACF,CAAC,CAAA;AACH;AAGA,IAAO,cAAA,EAAQ,YAAA;ADnCf;AACE;AACA;AACF,qEAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-equal/dist/cjs/index.cjs","sourcesContent":[null,"import { Feature, Geometry } from \"geojson\";\nimport { geojsonEquality } from \"geojson-equality-ts\";\nimport { cleanCoords } from \"@turf/clean-coords\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Determine whether two geometries of the same type have identical X,Y coordinate values.\n * See http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm\n *\n * @function\n * @param {Geometry|Feature} feature1 GeoJSON input\n * @param {Geometry|Feature} feature2 GeoJSON input\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.precision=6] decimal precision to use when comparing coordinates\n * @returns {boolean} true if the objects are equal, false otherwise\n * @example\n * var pt1 = turf.point([0, 0]);\n * var pt2 = turf.point([0, 0]);\n * var pt3 = turf.point([1, 1]);\n *\n * turf.booleanEqual(pt1, pt2);\n * //= true\n * turf.booleanEqual(pt2, pt3);\n * //= false\n */\nfunction booleanEqual(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry,\n options: {\n precision?: number;\n } = {}\n): boolean {\n let precision = options.precision;\n\n precision =\n precision === undefined || precision === null || isNaN(precision)\n ? 6\n : precision;\n\n if (typeof precision !== \"number\" || !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n\n const type1 = getGeom(feature1).type;\n const type2 = getGeom(feature2).type;\n if (type1 !== type2) return false;\n\n return geojsonEquality(cleanCoords(feature1), cleanCoords(feature2), {\n precision,\n });\n}\n\nexport { booleanEqual };\nexport default booleanEqual;\n"]}
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -4,7 +4,7 @@ import { Feature, Geometry } from 'geojson';
|
|
|
4
4
|
* Determine whether two geometries of the same type have identical X,Y coordinate values.
|
|
5
5
|
* See http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @function
|
|
8
8
|
* @param {Geometry|Feature} feature1 GeoJSON input
|
|
9
9
|
* @param {Geometry|Feature} feature2 GeoJSON input
|
|
10
10
|
* @param {Object} [options={}] Optional parameters
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Feature, Geometry } from 'geojson';
|
|
|
4
4
|
* Determine whether two geometries of the same type have identical X,Y coordinate values.
|
|
5
5
|
* See http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @function
|
|
8
8
|
* @param {Geometry|Feature} feature1 GeoJSON input
|
|
9
9
|
* @param {Geometry|Feature} feature2 GeoJSON input
|
|
10
10
|
* @param {Object} [options={}] Optional parameters
|
package/dist/esm/index.js
CHANGED
|
@@ -10,15 +10,14 @@ function booleanEqual(feature1, feature2, options = {}) {
|
|
|
10
10
|
}
|
|
11
11
|
const type1 = getGeom(feature1).type;
|
|
12
12
|
const type2 = getGeom(feature2).type;
|
|
13
|
-
if (type1 !== type2)
|
|
14
|
-
return false;
|
|
13
|
+
if (type1 !== type2) return false;
|
|
15
14
|
return geojsonEquality(cleanCoords(feature1), cleanCoords(feature2), {
|
|
16
15
|
precision
|
|
17
16
|
});
|
|
18
17
|
}
|
|
19
|
-
var
|
|
18
|
+
var index_default = booleanEqual;
|
|
20
19
|
export {
|
|
21
20
|
booleanEqual,
|
|
22
|
-
|
|
21
|
+
index_default as default
|
|
23
22
|
};
|
|
24
23
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Geometry } from \"geojson\";\nimport { geojsonEquality } from \"geojson-equality-ts\";\nimport { cleanCoords } from \"@turf/clean-coords\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Determine whether two geometries of the same type have identical X,Y coordinate values.\n * See http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm\n *\n * @
|
|
1
|
+
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Geometry } from \"geojson\";\nimport { geojsonEquality } from \"geojson-equality-ts\";\nimport { cleanCoords } from \"@turf/clean-coords\";\nimport { getGeom } from \"@turf/invariant\";\n\n/**\n * Determine whether two geometries of the same type have identical X,Y coordinate values.\n * See http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm\n *\n * @function\n * @param {Geometry|Feature} feature1 GeoJSON input\n * @param {Geometry|Feature} feature2 GeoJSON input\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.precision=6] decimal precision to use when comparing coordinates\n * @returns {boolean} true if the objects are equal, false otherwise\n * @example\n * var pt1 = turf.point([0, 0]);\n * var pt2 = turf.point([0, 0]);\n * var pt3 = turf.point([1, 1]);\n *\n * turf.booleanEqual(pt1, pt2);\n * //= true\n * turf.booleanEqual(pt2, pt3);\n * //= false\n */\nfunction booleanEqual(\n feature1: Feature<any> | Geometry,\n feature2: Feature<any> | Geometry,\n options: {\n precision?: number;\n } = {}\n): boolean {\n let precision = options.precision;\n\n precision =\n precision === undefined || precision === null || isNaN(precision)\n ? 6\n : precision;\n\n if (typeof precision !== \"number\" || !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n\n const type1 = getGeom(feature1).type;\n const type2 = getGeom(feature2).type;\n if (type1 !== type2) return false;\n\n return geojsonEquality(cleanCoords(feature1), cleanCoords(feature2), {\n precision,\n });\n}\n\nexport { booleanEqual };\nexport default booleanEqual;\n"],"mappings":";AACA,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,eAAe;AAsBxB,SAAS,aACP,UACA,UACA,UAEI,CAAC,GACI;AACT,MAAI,YAAY,QAAQ;AAExB,cACE,cAAc,UAAa,cAAc,QAAQ,MAAM,SAAS,IAC5D,IACA;AAEN,MAAI,OAAO,cAAc,YAAY,EAAE,aAAa,IAAI;AACtD,UAAM,IAAI,MAAM,qCAAqC;AAAA,EACvD;AAEA,QAAM,QAAQ,QAAQ,QAAQ,EAAE;AAChC,QAAM,QAAQ,QAAQ,QAAQ,EAAE;AAChC,MAAI,UAAU,MAAO,QAAO;AAE5B,SAAO,gBAAgB,YAAY,QAAQ,GAAG,YAAY,QAAQ,GAAG;AAAA,IACnE;AAAA,EACF,CAAC;AACH;AAGA,IAAO,gBAAQ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/boolean-equal",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.3.0",
|
|
4
|
+
"description": "Determine whether two geometries of the same type have identical X,Y coordinate values",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Tom MacWright <@tmcw>",
|
|
@@ -59,24 +59,24 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/benchmark": "^2.1.5",
|
|
62
|
-
"@types/tape": "^
|
|
62
|
+
"@types/tape": "^5.8.1",
|
|
63
63
|
"benchmark": "^2.1.4",
|
|
64
64
|
"boolean-shapely": "*",
|
|
65
|
-
"glob": "^
|
|
65
|
+
"glob": "^11.0.2",
|
|
66
66
|
"load-json-file": "^7.0.1",
|
|
67
67
|
"npm-run-all": "^4.1.5",
|
|
68
|
-
"tape": "^5.
|
|
69
|
-
"tsup": "^8.0
|
|
70
|
-
"tsx": "^4.
|
|
71
|
-
"typescript": "^5.
|
|
68
|
+
"tape": "^5.9.0",
|
|
69
|
+
"tsup": "^8.4.0",
|
|
70
|
+
"tsx": "^4.19.4",
|
|
71
|
+
"typescript": "^5.8.3"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@turf/clean-coords": "
|
|
75
|
-
"@turf/helpers": "
|
|
76
|
-
"@turf/invariant": "
|
|
74
|
+
"@turf/clean-coords": "7.3.0",
|
|
75
|
+
"@turf/helpers": "7.3.0",
|
|
76
|
+
"@turf/invariant": "7.3.0",
|
|
77
77
|
"@types/geojson": "^7946.0.10",
|
|
78
78
|
"geojson-equality-ts": "^1.0.2",
|
|
79
|
-
"tslib": "^2.
|
|
79
|
+
"tslib": "^2.8.1"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
|
|
82
82
|
}
|