1import { myName } from "https://esm.town/v/jakesing/myName";
2
3export function myApi() {
4 return "hi " + myName;
5}
1export function googleSheetsDate(date: Date): number {
2 return date.getTime() / 1000 / 60 / 60 / 24 + 25569
3}
1import { johnnycashtodolistcounter } from "https://esm.town/v/politelyinvinciblepointer/johnnycashtodolistcounter";
2
3export function getjohnnycashtodolistcounter() {
4 return johnnycashtodolistcounter;
5}
2import { fetchCongressTradeReports } from "https://esm.town/v/claytn/fetchCongressTradeReports?v=3";
3
4export async function congress() {
5 let text;
6 fetchCongressTradeReports((reports) => text = reports);
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getSofZmanShma(city) {
4 console.log({ city });
5 const today = new Date().toISOString().split("T")[0];
1export function myApi(name) {
2 return "hi " + name;
3}
3import { fetchRss } from "https://esm.town/v/pdebie/fetchRss";
4
5export async function syncCommentToLemmy(
6 instance: string,
7 redditUrl: string,
10 matcher?: (author: string, content: string) => boolean,
11) {
12 function hashCode(str) {
13 let hash = 0;
14 for (let i = 0, len = str.length; i < len; i++) {
21 const { LemmyHttp } = await import("npm:lemmy-js-client@0.18.1");
22 let client = new LemmyHttp(`https://${instance}`, {
23 fetchFunction: fetch,
24 });
25 // (client as any)["#fetchFunction"] = fetch;
26 let comments = (await fetchRss(redditUrl)).filter((i) =>
27 new Date(i.isoDate) >= new Date(Date.now() - 1000 * 60 * 60 * 24)
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 fetchHtmlDom(url: string) {
4 const { DOMParser } = await import(
5 "https://deno.land/x/deno_dom/deno-dom-wasm.ts"
A helper function to build a file's email
Simple functional CSS library for Val Town
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
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": "*",