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/image-url.jpg%20%22Image%20title%22?q=function&page=2167&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 22464 results for "function"(2885ms)

myApimain.tsx1 match

@andrewnUpdated 1 year ago
1export function myApi() {
2 return { something: "is happening" };
3}

myApimain.tsx1 match

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

btrdb_kv_examplemain.tsx2 matches

@yuuzaUpdated 1 year ago
10 await db.createSet("signData");
11 // 封装 get/set 操作
12 function getData(chatId, userId) {
13 return db.getSet("signData").get([chatId, userId]);
14 }
15 function setData(chatId, userId, data) {
16 return db.getSet("signData").set([chatId, userId], data);
17 }

waitmain.tsx1 match

@ju2l0rUpdated 1 year ago
1export async function wait(ms) {
2 await new Promise((resolve) => setTimeout(resolve, ms));
3}

calendarItemForLinemain.tsx1 match

@talUpdated 1 year ago
19 dailyOfferings?: Line;
20};
21export async function calendarItemForLine(context: Context, line: Line) {
22 const menuType = DOEMenuTypes[context.menuType];
23 if (line.date.type == "date") {

get_weathermain.tsx1 match

@mallocUpdated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let get_weather = async function () {
4 let response = await fetch(
5 "https://api.open-meteo.com/v1/forecast?latitude=49.26&longitude=-123.07&current_weather=true"

nodejsmain.tsx1 match

@easrngUpdated 1 year ago
1import { runVal } from "https://esm.town/v/std/runVal";
2
3export async function nodejs() {
4 const token =
5 (await runVal("easrng.nodejsInternals", {

echomain.tsx1 match

@twschillerUpdated 1 year ago
1export function echo(args) {
2 return args;
3}

myApimain.tsx1 match

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

myApimain.tsx1 match

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

getFileEmail4 file matches

@shouserUpdated 1 month ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblkUpdated 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.