@turf/midpoint
Advanced tools
@@ -11,7 +11,7 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// index.ts | ||
| } | ||
| var turf_midpoint_default = midpoint; | ||
| var index_default = midpoint; | ||
| exports.default = turf_midpoint_default; exports.midpoint = midpoint; | ||
| exports.default = index_default; exports.midpoint = midpoint; | ||
| //# sourceMappingURL=index.cjs.map |
@@ -1,1 +0,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,sBAAA,EAAQ,QAAA;ADvBf;AACE;AACA;AACF,qEAAC","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"]} | ||
| {"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"]} |
@@ -11,7 +11,7 @@ // index.ts | ||
| } | ||
| var turf_midpoint_default = midpoint; | ||
| var index_default = midpoint; | ||
| export { | ||
| turf_midpoint_default as default, | ||
| index_default as default, | ||
| midpoint | ||
| }; | ||
| //# sourceMappingURL=index.js.map |
@@ -1,1 +0,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,wBAAQ;","names":["midpoint"]} | ||
| {"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"]} |
+11
-11
| { | ||
| "name": "@turf/midpoint", | ||
| "version": "7.2.0", | ||
| "description": "turf midpoint module", | ||
| "version": "7.3.0", | ||
| "description": "Takes two points and calculates a point midway between them geodesically.", | ||
| "author": "Turf Authors", | ||
@@ -56,19 +56,19 @@ "license": "MIT", | ||
| "@types/benchmark": "^2.1.5", | ||
| "@types/tape": "^4.13.4", | ||
| "@types/tape": "^5.8.1", | ||
| "benchmark": "^2.1.4", | ||
| "npm-run-all": "^4.1.5", | ||
| "tape": "^5.9.0", | ||
| "tsup": "^8.3.5", | ||
| "tsx": "^4.19.2", | ||
| "typescript": "^5.5.4" | ||
| "tsup": "^8.4.0", | ||
| "tsx": "^4.19.4", | ||
| "typescript": "^5.8.3" | ||
| }, | ||
| "dependencies": { | ||
| "@turf/bearing": "^7.2.0", | ||
| "@turf/destination": "^7.2.0", | ||
| "@turf/distance": "^7.2.0", | ||
| "@turf/helpers": "^7.2.0", | ||
| "@turf/bearing": "7.3.0", | ||
| "@turf/destination": "7.3.0", | ||
| "@turf/distance": "7.3.0", | ||
| "@turf/helpers": "7.3.0", | ||
| "@types/geojson": "^7946.0.10", | ||
| "tslib": "^2.8.1" | ||
| }, | ||
| "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867" | ||
| "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd" | ||
| } |
10469
0.14%+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated
Updated