@turf/midpoint 7.2.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 +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +11 -11
package/dist/cjs/index.cjs
CHANGED
|
@@ -8,9 +8,9 @@ function midpoint(point1, point2) {
|
|
|
8
8
|
const midpoint2 = _destination.destination.call(void 0, point1, dist / 2, heading);
|
|
9
9
|
return midpoint2;
|
|
10
10
|
}
|
|
11
|
-
var
|
|
11
|
+
var index_default = midpoint;
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
exports.default =
|
|
15
|
+
exports.default = index_default; exports.midpoint = midpoint;
|
|
16
16
|
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-midpoint/dist/cjs/index.cjs","../../index.ts"],"names":["midpoint"],"mappings":"AAAA;ACCA,wCAAwB;AACxB,gDAA4B;AAC5B,0CAAyB;AAsBzB,SAAS,QAAA,CAAS,MAAA,EAAe,MAAA,EAA+B;AAC9D,EAAA,MAAM,KAAA,EAAO,gCAAA,MAAS,EAAQ,MAAM,CAAA;AACpC,EAAA,MAAM,QAAA,EAAU,8BAAA,MAAQ,EAAQ,MAAM,CAAA;AACtC,EAAA,MAAMA,UAAAA,EAAW,sCAAA,MAAY,EAAQ,KAAA,EAAO,CAAA,EAAG,OAAO,CAAA;AAEtD,EAAA,OAAOA,SAAAA;AACT;AAGA,IAAO,
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-midpoint/dist/cjs/index.cjs","../../index.ts"],"names":["midpoint"],"mappings":"AAAA;ACCA,wCAAwB;AACxB,gDAA4B;AAC5B,0CAAyB;AAsBzB,SAAS,QAAA,CAAS,MAAA,EAAe,MAAA,EAA+B;AAC9D,EAAA,MAAM,KAAA,EAAO,gCAAA,MAAS,EAAQ,MAAM,CAAA;AACpC,EAAA,MAAM,QAAA,EAAU,8BAAA,MAAQ,EAAQ,MAAM,CAAA;AACtC,EAAA,MAAMA,UAAAA,EAAW,sCAAA,MAAY,EAAQ,KAAA,EAAO,CAAA,EAAG,OAAO,CAAA;AAEtD,EAAA,OAAOA,SAAAA;AACT;AAGA,IAAO,cAAA,EAAQ,QAAA;ADvBf;AACE;AACA;AACF,6DAAC","file":"/home/runner/work/turf/turf/packages/turf-midpoint/dist/cjs/index.cjs","sourcesContent":[null,"import { Feature, Point } from \"geojson\";\nimport { bearing } from \"@turf/bearing\";\nimport { destination } from \"@turf/destination\";\nimport { distance } from \"@turf/distance\";\nimport { Coord } from \"@turf/helpers\";\n\n/**\n * Takes two points and returns a point midway between them. The midpoint is\n * calculated geodesically, meaning the curvature of the earth is taken into\n * account.\n *\n * @function\n * @param {Coord} point1 first point\n * @param {Coord} point2 second point\n * @returns {Feature<Point>} a point midway between `pt1` and `pt2`\n * @example\n * const point1 = turf.point([144.834823, -37.771257]);\n * const point2 = turf.point([145.14244, -37.830937]);\n *\n * const midpoint = turf.midpoint(point1, point2);\n *\n * //addToMap\n * const addToMap = [point1, point2, midpoint];\n * midpoint.properties['marker-color'] = '#f00';\n */\nfunction midpoint(point1: Coord, point2: Coord): Feature<Point> {\n const dist = distance(point1, point2);\n const heading = bearing(point1, point2);\n const midpoint = destination(point1, dist / 2, heading);\n\n return midpoint;\n}\n\nexport { midpoint };\nexport default midpoint;\n"]}
|
package/dist/esm/index.js
CHANGED
|
@@ -8,9 +8,9 @@ function midpoint(point1, point2) {
|
|
|
8
8
|
const midpoint2 = destination(point1, dist / 2, heading);
|
|
9
9
|
return midpoint2;
|
|
10
10
|
}
|
|
11
|
-
var
|
|
11
|
+
var index_default = midpoint;
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
index_default as default,
|
|
14
14
|
midpoint
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Point } from \"geojson\";\nimport { bearing } from \"@turf/bearing\";\nimport { destination } from \"@turf/destination\";\nimport { distance } from \"@turf/distance\";\nimport { Coord } from \"@turf/helpers\";\n\n/**\n * Takes two points and returns a point midway between them. The midpoint is\n * calculated geodesically, meaning the curvature of the earth is taken into\n * account.\n *\n * @function\n * @param {Coord} point1 first point\n * @param {Coord} point2 second point\n * @returns {Feature<Point>} a point midway between `pt1` and `pt2`\n * @example\n * const point1 = turf.point([144.834823, -37.771257]);\n * const point2 = turf.point([145.14244, -37.830937]);\n *\n * const midpoint = turf.midpoint(point1, point2);\n *\n * //addToMap\n * const addToMap = [point1, point2, midpoint];\n * midpoint.properties['marker-color'] = '#f00';\n */\nfunction midpoint(point1: Coord, point2: Coord): Feature<Point> {\n const dist = distance(point1, point2);\n const heading = bearing(point1, point2);\n const midpoint = destination(point1, dist / 2, heading);\n\n return midpoint;\n}\n\nexport { midpoint };\nexport default midpoint;\n"],"mappings":";AACA,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AAsBzB,SAAS,SAAS,QAAe,QAA+B;AAC9D,QAAM,OAAO,SAAS,QAAQ,MAAM;AACpC,QAAM,UAAU,QAAQ,QAAQ,MAAM;AACtC,QAAMA,YAAW,YAAY,QAAQ,OAAO,GAAG,OAAO;AAEtD,SAAOA;AACT;AAGA,IAAO,
|
|
1
|
+
{"version":3,"sources":["../../index.ts"],"sourcesContent":["import { Feature, Point } from \"geojson\";\nimport { bearing } from \"@turf/bearing\";\nimport { destination } from \"@turf/destination\";\nimport { distance } from \"@turf/distance\";\nimport { Coord } from \"@turf/helpers\";\n\n/**\n * Takes two points and returns a point midway between them. The midpoint is\n * calculated geodesically, meaning the curvature of the earth is taken into\n * account.\n *\n * @function\n * @param {Coord} point1 first point\n * @param {Coord} point2 second point\n * @returns {Feature<Point>} a point midway between `pt1` and `pt2`\n * @example\n * const point1 = turf.point([144.834823, -37.771257]);\n * const point2 = turf.point([145.14244, -37.830937]);\n *\n * const midpoint = turf.midpoint(point1, point2);\n *\n * //addToMap\n * const addToMap = [point1, point2, midpoint];\n * midpoint.properties['marker-color'] = '#f00';\n */\nfunction midpoint(point1: Coord, point2: Coord): Feature<Point> {\n const dist = distance(point1, point2);\n const heading = bearing(point1, point2);\n const midpoint = destination(point1, dist / 2, heading);\n\n return midpoint;\n}\n\nexport { midpoint };\nexport default midpoint;\n"],"mappings":";AACA,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AAsBzB,SAAS,SAAS,QAAe,QAA+B;AAC9D,QAAM,OAAO,SAAS,QAAQ,MAAM;AACpC,QAAM,UAAU,QAAQ,QAAQ,MAAM;AACtC,QAAMA,YAAW,YAAY,QAAQ,OAAO,GAAG,OAAO;AAEtD,SAAOA;AACT;AAGA,IAAO,gBAAQ;","names":["midpoint"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/midpoint",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.3.0",
|
|
4
|
+
"description": "Takes two points and calculates a point midway between them geodesically.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bugs": {
|
|
@@ -53,21 +53,21 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/benchmark": "^2.1.5",
|
|
56
|
-
"@types/tape": "^
|
|
56
|
+
"@types/tape": "^5.8.1",
|
|
57
57
|
"benchmark": "^2.1.4",
|
|
58
58
|
"npm-run-all": "^4.1.5",
|
|
59
59
|
"tape": "^5.9.0",
|
|
60
|
-
"tsup": "^8.
|
|
61
|
-
"tsx": "^4.19.
|
|
62
|
-
"typescript": "^5.
|
|
60
|
+
"tsup": "^8.4.0",
|
|
61
|
+
"tsx": "^4.19.4",
|
|
62
|
+
"typescript": "^5.8.3"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@turf/bearing": "
|
|
66
|
-
"@turf/destination": "
|
|
67
|
-
"@turf/distance": "
|
|
68
|
-
"@turf/helpers": "
|
|
65
|
+
"@turf/bearing": "7.3.0",
|
|
66
|
+
"@turf/destination": "7.3.0",
|
|
67
|
+
"@turf/distance": "7.3.0",
|
|
68
|
+
"@turf/helpers": "7.3.0",
|
|
69
69
|
"@types/geojson": "^7946.0.10",
|
|
70
70
|
"tslib": "^2.8.1"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
|
|
73
73
|
}
|