Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$%7Burl%7D?q=function&page=2629&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=function

Returns an array of strings in format "username" or "username/projectName"

Found 28734 results for "function"(7507ms)

extractJSDocmain.tsx3 matches

@pomdtr•Updated 1 year ago
8const commentRegex = /\/\*\*[\s\S]*?\*\//;
9
10function extractJSDocfromText(text: string) {
11 const comments = text.match(commentRegex);
12 if (!comments) {
18}
19
20async function extractJSDocfromURL(url: string) {
21 const text = await fetchText(url);
22 return extractJSDocfromText(text);
23}
24
25async function extractJSDocfromVal(author: string, name: string, version: string = "latest") {
26 if (version === "latest") {
27 return extractJSDocfromURL(`https://esm.town/v/${author}/${name}`);

jsoninvoice_editormain.tsx1 match

@pomdtr•Updated 1 year ago
26};
27
28export function Editor() {
29 return (
30 <html>

react_framer_motion_scriptmain.tsx1 match

@tfayyaz•Updated 1 year ago
7// import "https://esm.sh/tldraw/tldraw.css";
8
9export function App() {
10 return (
11 <>

sqliteBuilderTypedmain.tsx1 match

@postpostscript•Updated 1 year ago
33 : never;
34
35export function StatementTyped<T>(
36 strings: TemplateStringsArray,
37 // @ts-ignore

tldraw_react_clientmain.tsx1 match

@andreterron•Updated 1 year ago
6import { Tldraw } from "https://esm.sh/tldraw";
7
8export function App() {
9 return (
10 <>

Appmain.tsx1 match

@tfayyaz•Updated 1 year ago
22]];
23
24export function App() {
25 return (
26 <>

BrainF_Interpretermain.tsx1 match

@ethanoscarson•Updated 1 year ago
1function interpret(code, options = {}) {
2 let {
3 tapeSize = 1024,

redFerretmain.tsx1 match

@maxm•Updated 1 year ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

classless_cssREADME.md1 match

@thierryc•Updated 1 year ago
10import { randomStyle } from "https://esm.town/v/stevekrouse/classless_css";
11
12export default async function(req: Request): Promise<Response> {
13 return new Response(`<h1>Welcome to Val Town!</h1>${randomStyle}`, {
14 headers: {

classless_cssmain.tsx2 matches

@thierryc•Updated 1 year ago
4delete frameworks[""];
5
6function absolutePath(url: string) {
7 if (url.startsWith("http")) return url;
8 else return `https://classless-css-demo.deno.dev` + url;
13export const randomStyle = `<link rel="stylesheet" href="${randomURL}">`;
14
15export default function(req: Response) {
16 const url = new URL(req.url);
17

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblk•Updated 1 month ago
Simple functional CSS library for Val Town
lost1991
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": "*",
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.