From ccc9e1a2b9c2c3c62bf980c2c1fbab4674caef32 Mon Sep 17 00:00:00 2001 From: mfedderly <24275386+mfedderly@users.noreply.github.com> Date: Tue, 6 Aug 2024 12:36:22 -0400 Subject: [PATCH] Small fixes I've found along the way (#2675) Co-authored-by: Tim Welch --- packages/turf-line-offset/test.ts | 2 +- packages/turf-point-to-line-distance/README.md | 2 +- packages/turf-point-to-line-distance/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/turf-line-offset/test.ts b/packages/turf-line-offset/test.ts index 6efcfa7638..2ba7e84bf2 100644 --- a/packages/turf-line-offset/test.ts +++ b/packages/turf-line-offset/test.ts @@ -55,7 +55,7 @@ test("turf-line-offset - Throws Errors", (t) => { [0, 0], ]); t.throws(() => lineOffset(), /geojson is required/); - t.throws(() => lineOffset(line, /offset is required/)); + t.throws(() => lineOffset(line), /distance is required/); t.end(); }); diff --git a/packages/turf-point-to-line-distance/README.md b/packages/turf-point-to-line-distance/README.md index 37d7ce1e34..81792b28fa 100644 --- a/packages/turf-point-to-line-distance/README.md +++ b/packages/turf-point-to-line-distance/README.md @@ -15,7 +15,7 @@ minimum distance between the point and any segment of the `LineString`. * `options.units` **[string][7]** can be anything supported by turf/convertLength (ex: degrees, radians, miles, or kilometers) (optional, default `"kilometers"`) - * `options.method` **[string][7]** wether to calculate the distance based on geodesic (spheroid) or + * `options.method` **[string][7]** whether to calculate the distance based on geodesic (spheroid) or planar (flat) method. Valid options are 'geodesic' or 'planar'. (optional, default `"geodesic"`) ### Examples diff --git a/packages/turf-point-to-line-distance/index.ts b/packages/turf-point-to-line-distance/index.ts index 290aa70d0d..0bd7b60b48 100644 --- a/packages/turf-point-to-line-distance/index.ts +++ b/packages/turf-point-to-line-distance/index.ts @@ -23,7 +23,7 @@ import { rhumbDistance as getPlanarDistance } from "@turf/rhumb-distance"; * @param {Object} [options={}] Optional parameters * @param {string} [options.units="kilometers"] can be anything supported by turf/convertLength * (ex: degrees, radians, miles, or kilometers) - * @param {string} [options.method="geodesic"] wether to calculate the distance based on geodesic (spheroid) or + * @param {string} [options.method="geodesic"] whether to calculate the distance based on geodesic (spheroid) or * planar (flat) method. Valid options are 'geodesic' or 'planar'. * @returns {number} distance between point and line * @example