2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function dailyDadJoke() {
5 let { setup, punchline } = await fetchJSON("https://official-joke-api.appspot.com/random_joke");
6 return email({
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
1import { email } from "https://esm.town/v/std/email?v=9";
2
3async function fetchRandomJoke() {
4 const response = await fetch(
5 "https://official-joke-api.appspot.com/random_joke",
4};
5// Fetches a random joke.
6function fetchRandomJoke() {
7 const SAMPLE_JOKE = {
8 "setup": "What do you call a group of disorganized cats?",
2
3// Fetches a random joke.
4function fetchRandomJoke() {
5 const SAMPLE_JOKE = {
6 "setup": "What do you call a group of disorganized cats?",
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7
8// Fetches a random joke.
9async function fetchRandomJoke() {
10 const response = await fetch(
11 "https://official-joke-api.appspot.com/random_joke",
37### Updating Schema
38
39If you want to update the schema, or always verify the state that is pulled from the job, pass a function as the first argument:
40
41```typescript
2import * as cheerio from "npm:cheerio";
3
4export async function extractOpenGraphTags(request: Request) {
5 try {
6 const body = await request.json();
4
5// Fetches a random joke.
6async function fetchRandomJoke() {
7 const response = await fetch(
8 "https://official-joke-api.appspot.com/random_joke",
A helper function to build a file's email
Simple functional CSS library for Val Town
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",