1import { refs } from "https://esm.town/v/stevekrouse/refs";
2
3export function editRedirect() {
4 const ref = refs()[0];
5 const editURL = `https://val.town/v/${ref.userHandle}/${ref.valName}`;
1export function parseNotionDateDoc(obj): DateMeDoc {
2 return {
3 Id: obj.id,
2import { diffLines } from "https://esm.town/v/chet/diffLines";
3
4export function diffHtml(before: string, after: string) {
5 return diffLines(cleanHtml(before), cleanHtml(after));
6}
1export function diffLines(before: string, after: string) {
2 const addedLines = new Set(after.split("\n"));
3 before.split("\n").forEach((line) => addedLines.delete(line));
1import siversRssEmailNotification from "https://esm.town/v/chet/siversRssEmailNotification";
2
3export default async function(interval: Interval) {
4 await siversRssEmailNotification(interval);
5}
4import { parseXML } from "https://esm.town/v/stevekrouse/parseXML";
5
6export default async function(interval: Interval) {
7 // const lastRunAt = new Date(Date.now() - 1000 * 60 * 60 * 24 * 30 * 3);
8 const lastRunAt = interval.lastRunAt;
13 "buttondown.bsky.social",
14 ];
15 const promises = ALERT_STRINGS.map(async function(keyword) {
16 let posts = await fetchJSON(
17 `https://search.bsky.social/search/posts?q=${keyword}`,
1import { im } from "https://esm.town/v/envl/im";
2
3export async function sendMsg(req: Request) {
4 const msg = new URL(req.url).searchParams.get("msg") ?? (await req.json()).msg;
5 await im(msg);
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=42";
3
4export default async function (req: Request) {
5 const url = new URL(req.url);
6 const [, id, action] = url.pathname.split("/");
1let { userCount } = await import("https://esm.town/v/chrisk_7777/userCount");
2
3export function myApi(name) {
4 if (!userCount) {
5 userCount = [];
Simple functional CSS library for Val Town
A helper function to build a file's email
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": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.