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"
1export function myApi(name) {
2 return "hi " + name;
3}
2import { ghContent } from "https://esm.town/v/octref/ghContent";
3
4export async function updateISBNFile(isbn: string) {
5 const ISBN_PATH = "data/mine/books-isbn.json";
6 const content = await ghContent(ISBN_PATH);
1export function myApi(name) {
2 return "hi " + name;
3}
4 lon = +lon;
5 lat = +lat;
6 function dist(station) {
7 return Math.sqrt(
8 Math.pow(station.lat - lat, 2) + Math.pow(station.lon - lon, 2),
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.