deno.land / x / prayers@v1.6.0 / src / MethodRecommender.ts

MethodRecommender.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
import { findCountryByCoordinate } from 'country-locator'import { CountryMethods } from './data/methods'import type { Methods } from './types/Methods'import type { CoordinatesObject } from './types/Coordinates'
export function recommendMethod({ latitude, longitude }: CoordinatesObject): Methods[] | undefined { const countryInfo = findCountryByCoordinate(latitude, longitude) return countryInfo?.code ? (CountryMethods as Record<string, Methods[]>)[countryInfo?.code] : undefined}
prayers

Version Info

Tagged at
7 months ago