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=1694&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 17350 results for "function"(1883ms)

generateGuestbookSnippetmain.tsx2 matches

@vtdocs•Updated 1 year ago
11 const msg = document.querySelector('#valtown-message');
12 const submitBtn = document.querySelector('#valtown-submit');
13 async function getMessages() {
14 const r = await fetch('https://${valUser}-${valName}.express.val.run');
15 msgList.innerHTML = '<ul>';
19 msgList.innerHTML += '</ul>';
20 }
21 async function sendMessage() {
22 submitBtn.disabled = true
23 const r = await fetch('https://${valUser}-${valName}.express.val.run', {

myApimain.tsx1 match

@qeelei•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

weatherTestmain.tsx1 match

@ktm•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function weatherTest(lat, long) {
4 return "hi";
5 const URL = `https://api.weather.gov/points/${lat},${long}`;

deleteValmain.tsx1 match

@neverstew•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export function deleteVal({ token, id }: {
4 token: string;
5 id: string;

myApimain.tsx1 match

@li_shuai•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

myApimain.tsx1 match

@herveDarritchon•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

gpt3main.tsx1 match

@isfeng•Updated 1 year ago
1import { runVal } from "https://esm.town/v/std/runVal";
2
3export async function gpt3(msg) {
4 return await runVal("patrickjm.gpt3", {
5 prompt: JSON.stringify(msg),

testmain.tsx1 match

@xiyouMc•Updated 1 year ago
1export function test() {
2 return "AAAA";
3}

untitled0045282main.tsx1 match

@eric•Updated 1 year ago
3import { getEmails } from "https://esm.town/v/eric/getEmails";
4
5untitled0045282 = export async function asyncSubscribe() {
6 const s = await getEmails()
7 console.log(s)

github_avatarmain.tsx1 match

@ski•Updated 1 year ago
1export function github_avatar(username) {
2 return `https://github.com/${username}.png`;
3}

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