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=1499&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"(1242ms)

dailyDadJokemain.tsx1 match

@viniciuscainelli•Updated 1 year ago
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function dailyDadJoke() {
5 let { setup, punchline } = await fetchJSON("https://official-joke-api.appspot.com/random_joke");
6 return email({

sapphireHummingbirdmain.tsx1 match

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

azureBasiliskmain.tsx1 match

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

roseRoundwormmain.tsx1 match

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

blushGorillamain.tsx1 match

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

SampleJokemain.tsx1 match

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

tomatoSolemain.tsx1 match

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

reactiveStateBlobREADME.md1 match

@postpostscript•Updated 1 year ago
37### Updating Schema
38
39If you want to update the schema, or always verify the state that is pulled from the job, pass a function as the first argument:
40
41```typescript

extract_opengraph_datamain.tsx1 match

@cotr•Updated 1 year ago
2import * as cheerio from "npm:cheerio";
3
4export async function extractOpenGraphTags(request: Request) {
5 try {
6 const body = await request.json();

goldRattlesnakemain.tsx1 match

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

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": "*",