1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function scrapeWebsite(url) {
4 const { DOMParser } = await import(
5 "https://deno.land/x/deno_dom@v0.1.38/deno-dom-wasm.ts"
1export function pocket() {
2 return {
3 hello: () => { return 'hi there' }
3import { notionWordCounterDaysLastCached } from "https://esm.town/v/andreterron/notionWordCounterDaysLastCached";
4
5export async function notionWordCounterFetchDays() {
6 if (
7 notionWordCounterDaysLastCached >
1export function myApi(name) {
2 return "hi " + name;
3}
1export async function sampleFirehose() {
2 const cborx = await import("https://deno.land/x/cbor@v1.5.2/index.js");
3 const multiformats = await import("npm:multiformats");
143 return decoded;
144 };
145 async function* byFrame(ws: WebSocketStream) {
146 const { readable } = await ws.connection;
147 const reader = readable.getReader();
156 }
157 }
158 async function* byMessage(ws: WebSocketStream) {
159 for await (const frame of byFrame(ws)) {
160 if (frame.isMessage()) {
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
4// https://api.val.town/v1/express/zzz.rime?text=Hello%20Val%20Town
5// videoId: either videoId or full youtube url (e.g. https://www.youtube.com/watch?v=p2glje8z_tw)
6export async function YoutubeSummary(req, res) {
7 const { videoId = "p2glje8z_tw" } = req.query;
8 const text = await YoutubeTranscript(videoId, false) as string;
2import { normalizeURL } from "https://esm.town/v/stevekrouse/normalizeURL?v=3";
3
4export async function fetchTweet(url) {
5 const tweetId = url.match(/(\d{19})/)[1];
6 const tweetUrl =
1export function cronTest() {
2 console.log("hello world");
3 return "hello world";
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": "*",