Search
Code238
const values = res.results.map((o) => o.value); const aqi = await nowcastPMAqi(values); console.email( `The AQI at ${res.results[0].location} is ${aqi}`, `The AQI report`
export function myApi(name) { console.email("Yo, " + name); return "hi " + name;}
(m) => m.parameter === "pm25" ).value; if (pm25 > 50) console.email(null, `AQI is ${pm25}, close your windows!`); return pm25;
) ).results[1].measurements.find((m) => m.parameter === "pm25").value; if (pm25 > 50) console.email(null, `AQI is ${pm25}, close your windows!`);};
`https://api.trakt.tv/shows/${show}/seasons/${newestSeason}` ); console.email( `Episodes in latest season(${newSsnJSON[0].season}): \n` + newSsnJSON.map((x) => `- E${x.number}: ${x.title}`).join("\n"),
export let consoleEmailEx = (() => { console.email("message"); // any JSON object can be the message console.email({ html: "<h1>hello html emails!</h1>" }); // you can send HTML emails console.email({ hi: "there" }, "Subject Line"); // optional second arg is the subject line console.email({ html: "<b>hi!</b>", subject: "Subject accepted here too" });})();
// email yourself as easily as logging to the consoleexport let consoleEmailEx = (() => { console.email("message"); // any JSON object can be the message console.email({ html: "<h1>hello html emails!</h1>" }); // you can send HTML emails console.email({ hi: "there" }, "Subject Line"); // optional second arg is the subject line console.email({ html: "<b>hi!</b>", subject: "Subject accepted here too" });})();
emailContent.push(tasRstStr); if (results.some((result) => result.status === "Failed")) { console.email({ "[PollingFailed]": "HealthCheck Failed", "Results": emailContent, } // else { // console.email({ // "[PollingSuccess]": "HealthCheck Success", // "Results": emailContent,
// email yourself as easily as logging to the consoleexport let consoleEmailEx = (() => { console.email("message"); // any JSON object can be the message console.email({ html: "<h1>hello html emails!</h1>" }); // you can send HTML emails console.email({ hi: "there" }, "Subject Line"); // optional second arg is the subject line console.email({ html: "<b>hi!</b>", subject: "Subject accepted here too" });})();