web_lib

Common web application libraries
git clone https://radroots.dev/git/web_lib.git
Log | Files | Refs | LICENSE

geo.ts (299B)


      1 import type { GeolocationPoint } from "@radroots/geo";
      2 
      3 export const geop_is_valid = (point?: GeolocationPoint): point is GeolocationPoint => {
      4     if (!point) return false;
      5     return !(point.lat === 0 && point.lng === 0);
      6 };
      7 
      8 export const geop_init = (): GeolocationPoint => ({ lat: 0, lng: 0 });