4export let githubFileChanged = async (owner, repo, file) => {
5 let handle = `${owner}/${repo}/${file}`
6 let current = await fetchJSON(`https://api.github.com/repos/${owner}/${repo}/contents/${file}`)
7 let previous = githubFileCache[handle]
8 if (previous?.content && current?.content && previous?.content !== current?.content) {
3// Random math fact
4export let mathFact = fetchText(
5 "http://numbersapi.com/random/math"
6);
19 url,
20 username: url
21 .replace("https://api.github.com/users/", "")
22 .replace("/events", ""),
23 commitsLast7Days: commits.filter((commit) =>
3// Public holidays in the US in 2023
4export let holidaysUS = fetchJSON(
5 "https://date.nager.at/api/v2/publicholidays/2023/US"
6);
4export let kindness = async () => {
5 return await gpt3({
6 openAiKey: process.env.OPENAI_API_KEY,
7 prompt:
8 "Speaking as universal consciousness, say something short, true, uplifting, loving, and kind.",
1export function myApi(name) {
2 return "hi " + name;
3}
2
3export let nameTopHNThreadUsingSomeonesVal = (async () => {
4 // Cheerio parses markup and provides an API to interact with the resulting data structure
5 const cheerio = await import("npm:cheerio"); // You can import NPM packages
6 const replyText = await fetchText(
1export function myApi(name) {
2 return "hi " + name;
3}
1let { fizz } = await import("https://esm.town/v/acmu/fizz");
2
3export function clearMyApi(name) {
4 fizz = "";
5 return "clear yes nbnbnb";
1export function myApi(name) {
2 return "hi " + name;
3}