1export function myApi(name) {
2 return "hi " + name;
3}
1export function test() {
2 return new Date();
3}
5import { stopDeparturesCache } from "https://esm.town/v/kognise/stopDeparturesCache";
6
7export async function stopDepartures(globalStopId: string) {
8 const cached = stopDeparturesCache[globalStopId];
9 if (cached && Date.now() - cached.time < transitCacheExpiry) {
2let { nameList } = await import("https://esm.town/v/acmu/nameList");
3
4export async function myApiAdd(name) {
5 if (Array.isArray(nameList)) {
6 nameList.push(name);
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function fetchWikipediaContent(url) {
4 try {
5 const title = url.split("/wiki/")[1];
1export function multiplyBy5(value) {
2 return value * 5;
3}
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function sendMessage(ptnKey: string, message: string) {
4 await fetch("https://app.phonetonote.com/hooks/zapier", {
5 body: JSON.stringify({
2import { extractReiseauskunftDbStationCodeFromUrl } from "https://esm.town/v/hanbzu/extractReiseauskunftDbStationCodeFromUrl";
3
4export async function getReiseauskunftDeps(station, date, time) {
5 const { DOMParser } = await import(
6 "https://deno.land/x/deno_dom/deno-dom-wasm.ts"
7 );
8 function convertDateIsoToGerman(date) {
9 return [...date.matchAll(/^(\d{4})-0?(\d+)-0?(\d+)$/g)].map(
10 ([, year, month, day]) =>
15 );
16 }
17 function extractStops(string) {
18 const regex =
19 /(\w+(?: \w+)?(?: \w+)?(?: \w+)?(?: \w+)?(?: \w+)?(?: \w+)?(?: \w+)?(?: \w+)?(?: \w+)?) \n(\d{2}:\d{2})/g;
A helper function to build a file's email
Simple functional CSS library for Val Town
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.