1export function parseFigmaURL(url) {
2 const regex = /^https:\/\/www.figma.com\/file\/([^/]+)\/([^/?]+)(\?[^/#]+)?/;
3 const match = url.match(regex);
9 <h3>What is a val?</h3>
10 <p>A val is small JavaScript or TypeScript snippet of code, written in the browser and run in our servers.
11Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.<p>
12 </li>
13
1import { fetchHtmlDom } from "https://esm.town/v/aeaton/fetchHtmlDom";
2
3export async function peelSessionArtistSessions(url) {
4 const dom = await fetchHtmlDom(url);
5 const list = dom.querySelector(".link-list");
1export function myApi(name) {
2 return "hi " + name;
3}
1export function runner(req, resp) {
2 console.log(req);
3 console.log(resp);
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export async function nyt(req: express.Request, res: express.Response) {
4 const data = await fetchText(
5 "https://cn.nytimes.com/",
1import { valCanvasHTML } from "https://esm.town/v/liamdanielduffy/valCanvasHTML";
2
3export async function valCanvas(req: express.Request, res: express.Response) {
4 res.set("Content-Type", "text/html");
5 res.send(valCanvasHTML);
1export function snakeToTitleCase(str) {
2 return str
3 .split("_")
1export async function run(req: express.Request, res: express.Response) {
2 let c = (
3 s,
1import { guestCount } from "https://esm.town/v/wesbos/guestCount";
2
3export function myApi(name) {
4 return "hi" + guestCount;
5}
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.