1export function add(a, b) {
2 return a + b;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
8// 5. When you are on any page, click the newly added bookmark
9// It should generate a QR code that you can scan and open on your mobile
10export async function generateQR(req, res) {
11 const url = req.query.url;
12 res.set("Content-Type", "text/html");
3import { hnLatestPosts } from "https://esm.town/v/stevekrouse/hnLatestPosts?v=18";
4
5export async function hnClojure({ lastRunAt }: Interval) {
6 let posts = await hnLatestPosts({
7 query: "clojure",
1export async function getEmojis(num, isRandom = false) {
2 const { default: emojis } = await import("npm:emojis-list");
3 if (isRandom) {
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export function comments({ token, relationship, since, until, offset, limit }: {
5 token: string;
6 relationship?: "received" | "given" | "any";
8}
9
10export async function giveMeLeNews({ feedlyAPI }: LeNews) {
11 return "Works";
12}
1let { hnBlockList } = await import("https://esm.town/v/andre_h/hnBlockList");
2
3export function hnMuteStory(id) {
4 console.log(`Muting story ${id}`);
5 hnBlockList = [...(hnBlockList ?? []), id];
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export async function dailyMathFact() {
4 let mathFact = await fetchText(
5 "http://numbersapi.com/random/math",
1export function myApi() {
2 return { something: "is happening" };
3}
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.