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=1686&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 17296 results for "function"(3149ms)

myApimain.tsx1 match

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

testHTMLmain.tsx1 match

@sairamoe•Updated 1 year ago
1export function testHTML(req: express.Request, res: express.Response) {
2 res.send(
3 "<html lang='en'>" +

pollRssmain.tsx1 match

@hipstersmoothie•Updated 1 year ago
1import { newRSSItems } from "https://esm.town/v/stevekrouse/newRSSItems?v=6";
2
3export async function pollRss({ lastRunAt }) {
4 const items = await newRSSItems({
5 url: "https://inkandswitch.com/index.html",

myApimain.tsx1 match

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

measureValTownE2emain.tsx1 match

@dbcooper•Updated 1 year ago
28
29 console.log(
30 `average e2e user function time: ${(
31 userFuncTimes.reduce((a, b) => a + b, 0) / count
32 ).toFixed(0)}ms (fastest was ${userFuncTimes

sendEmailmain.tsx1 match

@dugagjin•Updated 1 year ago
1export async function sendEmail() {
2 console.email("hello", "val.town");
3}

myApimain.tsx1 match

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

handleFetchTextResponsemain.tsx1 match

@devdoshi•Updated 1 year ago
1export let handleFetchTextResponse = async function (response: Response) {
2 if (response.ok) {
3 return await response.text();

confessionmain.tsx2 matches

@alp•Updated 1 year ago
22Yet here I am, swamped with guilt. Despite my code running smoothly, the weight of my
23transgressions bears heavily upon me. I see the sneaky shortcuts in my code, each one a
24deceptively functional fetchProxy instance, and I can't help but feel like a sneaky
25impostor, a charlatan.
26
27I beseech you, val.town overlords, for guidance in my journey towards understanding and
28respecting the limitations of fetchProxy. May the power of async and await continue to
29guide me, and may I resist the seductive whispers of unsupported, yet seemingly functional,
30concurrency.
31

myApimain.tsx1 match

@fishynio•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
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
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.