Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: IsLongitude & IsLatitude missing input type number #2568

Open
Juliencd opened this issue Jan 3, 2025 · 0 comments · May be fixed by #2569
Open

fix: IsLongitude & IsLatitude missing input type number #2568

Juliencd opened this issue Jan 3, 2025 · 0 comments · May be fixed by #2569
Labels
status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature.

Comments

@Juliencd
Copy link

Juliencd commented Jan 3, 2025

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`);
}
@Juliencd Juliencd added status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature. labels Jan 3, 2025
@Juliencd Juliencd linked a pull request Jan 3, 2025 that will close this issue
6 tasks
@Juliencd Juliencd changed the title fix: IsLongitude & IsLatitude missing number input type fix: IsLongitude & IsLatitude missing input type number Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature.
Development

Successfully merging a pull request may close this issue.

1 participant