Skip to content

Commit

Permalink
api(isValidCoordinate): update the error and parameter descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Scott-Lassiter committed May 25, 2022
1 parent f5658f3 commit 7e3e8ed
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/coordinates/validCoordinate.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ const { valid3DCoordinate } = require('./valid3DCoordinate')
* @see https://github.com/M-Scott-Lassiter/jest-geojson/issues/4
* @param {GeoJSON2DCoordinate|GeoJSON3DCoordinate} coordinate A WGS-84 array of [longitude, latitude] or [longitude, latitude, alititude]
* @returns {boolean} True if a valid 3D GeoJSON coordinate. If invalid, it will throw an error.
// * @throws {Error} Input must be an array of only three elments
// * @throws {Error} Altitude value must be numeric
* @throws {Error} Input must be an array of only two or three elments
*/
function validCoordinate(coordinate) {
if (!Array.isArray(coordinate) || coordinate.length < 2 || coordinate.length > 3) {
Expand Down

0 comments on commit 7e3e8ed

Please sign in to comment.