Versions

  • v4

    2d ago
    Open: Version
    Changes from v3 to v4
    +1
    -1
    import { email } from "https://esm.town/v/std/email?v=9";
    import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";

    export async function aqi(interval: Interval) {
    const location = "Philadelphia"; // <-- change to place, city, or zip code
    const data = await easyAQI({ location });
    if (!interval.lastRunAt) {
    ⦚ 13 unchanged lines ⦚
    import { email } from "https://esm.town/v/std/email?v=9";
    import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";

    export async function aqi(interval: Interval) {
    const location = "West Goshen, PA"; // <-- change to place, city, or zip code
    const data = await easyAQI({ location });
    if (!interval.lastRunAt) {
    ⦚ 13 unchanged lines ⦚
  • v3

    2d ago
    Open: Version
    Changes from v2 to v3
    +1
    -1
    import { email } from "https://esm.town/v/std/email?v=9";
    import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";

    export async function aqi(interval: Interval) {
    const location = "Philadelphia, PA"; // <-- change to place, city, or zip code
    const data = await easyAQI({ location });
    if (!interval.lastRunAt) {
    ⦚ 13 unchanged lines ⦚
    import { email } from "https://esm.town/v/std/email?v=9";
    import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";

    export async function aqi(interval: Interval) {
    const location = "Philadelphia"; // <-- change to place, city, or zip code
    const data = await easyAQI({ location });
    if (!interval.lastRunAt) {
    ⦚ 13 unchanged lines ⦚
  • v2

    2d ago
    Open: Version
    Changes from v1 to v2
    +1
    -1
    import { email } from "https://esm.town/v/std/email?v=9";
    import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";

    export async function aqi(interval: Interval) {
    const location = "Philadelphia"; // <-- change to place, city, or zip code
    const data = await easyAQI({ location });
    if (!interval.lastRunAt) {
    ⦚ 13 unchanged lines ⦚
    import { email } from "https://esm.town/v/std/email?v=9";
    import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";

    export async function aqi(interval: Interval) {
    const location = "Philadelphia, PA"; // <-- change to place, city, or zip code
    const data = await easyAQI({ location });
    if (!interval.lastRunAt) {
    ⦚ 13 unchanged lines ⦚
  • v1

    2d ago
    Open: Version
    Changes from v0 to v1
    +1
    -1
    import { email } from "https://esm.town/v/std/email?v=9";
    import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";

    export async function aqi(interval: Interval) {
    const location = "downtown brooklyn"; // <-- change to place, city, or zip code
    const data = await easyAQI({ location });
    if (!interval.lastRunAt) {
    ⦚ 13 unchanged lines ⦚
    import { email } from "https://esm.town/v/std/email?v=9";
    import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";

    export async function aqi(interval: Interval) {
    const location = "Philadelphia"; // <-- change to place, city, or zip code
    const data = await easyAQI({ location });
    if (!interval.lastRunAt) {
    ⦚ 13 unchanged lines ⦚
  • v0

    2d ago
    Open: Version
    +20
    -0

    import { email } from "https://esm.town/v/std/email?v=9";
    import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";

    export async function aqi(interval: Interval) {
    const location = "downtown brooklyn"; // <-- change to place, city, or zip code
    const data = await easyAQI({ location });
    if (!interval.lastRunAt) {
    email({
    text:
    `You will now get Air Quality alerts for ${location} if it's unhealthy. It is now ${data.aqi} which is ${data.severity}.`,
    subject: `AQI Alerts for ${location} setup!`,
    });
    }
    if (data.severity.includes("Unhealthy")) {
    email({
    text: "Air Quality: " + data.severity,
    subject: `AQI in ${location} is ${data.aqi}`,
    });
    }
    }
1
Next
Updated: March 12, 2025