1
2
3
4
5
6
7
8
9
10
11
12
13
import { getWeather } from "https://esm.town/v/stevekrouse/getWeather";
import { email } from "https://esm.town/v/std/email";
export default async function(interval: Interval) {
let weather = await getWeather("Brooklyn, NY");
let feelsLike = weather.current_condition[0].FeelsLikeF;
let description = weather.current_condition[0].weatherDesc[0].value;
await email({
subject: `Weather now is ${description} and ${feelsLike}°F`,
to: "",
});
}
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!
August 23, 2024