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=1500&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 17289 results for "function"(1822ms)

aquaLizardmain.tsx1 match

@narraje•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",

weatherGPTmain.tsx2 matches

@seflless•Updated 1 year ago
4import { html } from "https://esm.town/v/stevekrouse/html?v=5";
5
6export function WeatherSuggest() {
7 // const onClick = () => alert("Button clicked!");
8 const [data, setData] = useState(null);
19}
20
21export default async function weatherGPT(req: Request) {
22 const { OpenAI } = await import("npm:openai");
23

scarletHawkmain.tsx1 match

@lucaslaje•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",

summain.tsx2 matches

@kiff0•Updated 1 year ago
1import { assertEquals } from "https://deno.land/std@0.221.0/assert/mod.ts";
2
3export function sum(a: number, b: number) {
4 if (a === 0) {
5 return b;
21}
22
23export function runTests() {
24 assertEquals(6, sum(0, 6));
25 assertEquals(7, sum(7, 0));

whiteRoadrunnermain.tsx1 match

@henrybednarz•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",

grayDormousemain.tsx3 matches

@natalyazheng1•Updated 1 year ago
7
8// Fetches a random joke.
9// function fetchRandomJoke() {
10// const SAMPLE_JOKE = {
11// "setup": "What do you call a group of disorganized cats?",
28
29// Fetches a random joke.
30// function fetchRandomJoke() {
31// const response = fetch(
32// "https://official-joke-api.appspot.com/random_joke",
40
41// Fetches a random joke.
42async function fetchRandomJoke() {
43 const response = await fetch(
44 "https://official-joke-api.appspot.com/random_joke",

harlequinEmuREADME.md1 match

@stevekrouse•Updated 1 year ago
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query
37

orangePiranhamain.tsx1 match

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

modifyIframeResponsemain.tsx2 matches

@nbbaier•Updated 1 year ago
1function modifyResponse(
2 res: Response,
3) {
9}
10
11function modifyIframeResponse(
12 handler: (req: Request) => Response | Promise<Response>,
13): (req: Request) => Promise<Response> {

orangeMackerelmain.tsx2 matches

@halgendy•Updated 1 year ago
7
8// Fetches a random joke.
9// function fetchRandomJoke() {
10// const SAMPLE_JOKE = {
11// "setup": "What do you call a group of disorganized cats?",
17// Fetches a random joke.
18// Fetches a random joke.
19async function fetchRandomJoke() {
20 const response = await fetch(
21 "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 1 week 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": "*",