Skip to content

fix: IsLongitude & IsLatitude missing input type number #2568

Open
@Juliencd

Description

@Juliencd

Description

Both functions isLatitude and isLatitude should support number as input type like the documentation mentions it.

Checks if the string or number is a valid latitude coordinate.

Actual behavior

export function isLatitude(value: string): boolean {
  return (typeof value === 'number' || typeof value === 'string') && isLatLong(`${value},0`);
}

Expected behavior

export function isLatitude(value: number | string): boolean {
  return (typeof value === 'number' || typeof value === 'string') && isLatLong(`${value},0`);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageIssues which needs to be reproduced to be verified report.type: fixIssues describing a broken feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions