Public
Cron
Runs every 7 days
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { email } from "https://esm.town/v/std/email?v=9";
import { getIssueNumber } from "https://esm.town/v/Timmy/getIssueNumber";
export async function main() {
let latestIssue = 643;
const init = (async () => {
const currentIssueNumber = await getIssueNumber;
console.log(currentIssueNumber, "--------");
if (currentIssueNumber > latestIssue) {
latestIssue = currentIssueNumber;
await email({
text:
`There is a new issue on JavaScript Weekly: https://javascriptweekly.com/issues ${latestIssue}`,
});
}
return latestIssue;
});
return init();
}
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