1
2
3
4
5
6
7
8
9
10
import { wttrAstronomyData } from "https://esm.town/v/rwev/wttrAstronomyData";
import { wttrJson as wttrJson2 } from "https://esm.town/v/rwev/wttrJson";
export async function wttrAstronomyReportData(location: string) {
const wttrJson = await wttrJson2(location);
const area = wttrJson.nearest_area[0];
const observation = `Astrology report for ${area.areaName[0].value}, ${area.region[0].value}, ${area.country[0].value}`;
const data = await wttrAstronomyData(wttrJson);
return { observation, data };
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023