UNPKG

zero-deps-prayer-times

Version:

A lightweight, embeddable Islamic prayer times calculator based on date and coordinates, with zero external dependencies.

17 lines (13 loc) 290 B
export function isValidCoordinates(coordinates: { longitude: number; latitude: number; }): boolean { const { longitude: lon, latitude: lat } = coordinates; if (lat < -90 || lat > 90) { return false; } if (lon < -180 || lon > 180) { return false; } return true; }