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/?q=function&page=1659&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 18081 results for "function"(1604ms)

washer_3dmain.tsx1 match

@dupontgu•Updated 1 year ago
1export async function washer_3d(request: Request): Promise<Response> {
2 const u = new URL(request.url);
3 const params = Object.fromEntries(u.searchParams.entries());

markdocReactExamplemain.tsx2 matches

@pomdtr•Updated 1 year ago
21};
22
23function Val({ author, name }) {
24 return <iframe width="600" height="300" frameBorder="0" src={`https://www.val.town/embed/${author}/${name}`} />;
25}
26
27export async function markdocReactExample(req: Request) {
28 // extract the current val readme
29 const { author, name } = extractValInfo(import.meta.url);

georgiaTechRegistrationmain.tsx1 match

@brownieinmotion•Updated 1 year ago
4const TERM = "202402";
5
6export async function georgiaTechRegistration(request: Request): Promise<Response> {
7 const course = new URL(request.url).searchParams.get("courseId")?.toString();
8 if (course === undefined) return Response.json({ error: "missing courseId" });

emailRandomJokemain.tsx1 match

@jobvengalil•Updated 1 year ago
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

emailRandomJokemain.tsx1 match

@lenatong3•Updated 1 year ago
2
3// Fetches a random joke.
4function fetchRandomJoke() {
5 const SAMPLE_JOKE = {
6 "setup": "What do you call a group of disorganized cats?",

SAMPLE_JOKEmain.tsx1 match

@lenatong3•Updated 1 year ago
3 "punchline": "A cat-tastrophe.",
4}; // Fetches a random joke.
5function fetchRandomJoke() {
6 const SAMPLE_JOKE = {
7 "setup": "What do you call a group of disorganized cats?",

emailRandomJokemain.tsx1 match

@ellison0421•Updated 1 year ago
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

emailRandomJokemain.tsx1 match

@nickpfeiffer05•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=9";
2// Fetches a random joke.
3async function fetchRandomJoke() {
4 const response = await fetch(
5 "https://official-joke-api.appspot.com/random_joke",

emailRandomJokemain.tsx1 match

@nandhininatarajan•Updated 1 year ago
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

emailRandomJokemain.tsx1 match

@davidyu75•Updated 1 year ago
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

getFileEmail4 file matches

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

tuna8 file matches

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