Versions

  • v3

    11/23/2023
    Open: Version
    Changes from v2 to v3
    +6
    -7
    import { email } from "https://esm.town/v/std/email?v=9";

    // Fetches a random joke.
    function fetchRandomJoke() {
    const SAMPLE_JOKE = {
    "setup": "What do you call a group of disorganized cats?",
    "punchline": "A cat-tastrophe.",
    };
    return SAMPLE_JOKE;
    }

    const randomJoke = fetchRandomJoke();
    const setup = randomJoke.setup;
    const punchline = randomJoke.punchline;
    ⦚ 6 unchanged lines ⦚
    import { email } from "https://esm.town/v/std/email?v=9";

    // Fetches a random joke.
    async function fetchRandomJoke() {
    const response = await fetch(
    "https://official-joke-api.appspot.com/random_joke",
    );
    return response.json();
    }

    const randomJoke = await fetchRandomJoke();
    const setup = randomJoke.setup;
    const punchline = randomJoke.punchline;
    ⦚ 6 unchanged lines ⦚
  • v2

    11/23/2023
    Open: Version
    Changes from v1 to v2
    +20
    -4
    export const SAMPLE_JOKE = {
    "setup": "What do you call a group of disorganized cats?",
    "punchline": "A cat-tastrophe.",
    };
    import { email } from "https://esm.town/v/std/email?v=9";

    // Fetches a random joke.
    function fetchRandomJoke() {
    const SAMPLE_JOKE = {
    "setup": "What do you call a group of disorganized cats?",
    "punchline": "A cat-tastrophe.",
    };
    return SAMPLE_JOKE;
    }

    const randomJoke = fetchRandomJoke();
    const setup = randomJoke.setup;
    const punchline = randomJoke.punchline;

    // Sends an email with the joke.
    export const emailRandomJoke = email({
    text: punchline,
    subject: setup,
    });
  • v1

    11/23/2023
    Open: Version
    Changes from v0 to v1
    +4
    -4
    import _ from "npm:lodash-es";

    let numbers = _.range(10);
    export const untitled_apricotWalrus = numbers.map(n => n * 2);
    export const SAMPLE_JOKE = {
    "setup": "What do you call a group of disorganized cats?",
    "punchline": "A cat-tastrophe.",
    };
  • v0

    11/23/2023
    Open: Version
    +4
    -0

    import _ from "npm:lodash-es";

    let numbers = _.range(10);
    export const untitled_apricotWalrus = numbers.map(n => n * 2);
1
Next
Updated: November 23, 2023