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=1588&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 18726 results for "function"(3229ms)

uptimemain.tsx1 match

@cn_d_•Updated 11 months ago
6);
7
8export async function uptimeCheck(url: string) {
9 let ok = true;
10 let reason: string;

oceanThememain.tsx1 match

@iamseeley•Updated 11 months ago
166 border-radius: 50%;
167 animation: rise infinite;
168 animation-timing-function: linear;
169 }
170

httpApiScreenshotPageExamplemain.tsx1 match

@charlypoly•Updated 11 months ago
3import Jimp from "npm:jimp";
4
5export async function blobReadPictureExample(request: Request): Promise<Response> {
6 const searchParams = new URL(request.url).searchParams;
7 const url = searchParams.get("url") || "https://www.browserbase.com";

semanticSearchmain.tsx1 match

@yawnxyz•Updated 11 months ago
40 const fieldList = fields.split(',').map(field => field.trim());
41
42 this.idx = lunr(function () {
43 this.ref('id');
44 fieldList.forEach(field => {

createGeneratedValmain.tsx3 matches

@yawnxyz•Updated 11 months ago
25 {
26 role: "user",
27 content: `Here's the description of the function I want to write:
28 ${description}
29 Please start writing the function now, and just write the function, no console.log required:
30 `,
31 },
47};
48
49export async function createVal({ description, valTownKey, code, name, type }) {
50
51 // give it code or generate code

magentaCanidaemain.tsx1 match

@yawnxyz•Updated 11 months ago
1export default async function (req: Request): Promise<Response> {
2 return new Response('HELLO HELLO', { status: 200 });
3}

wahoomain.tsx1 match

@yawnxyz•Updated 11 months ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json( {message: 'hello!!'})
3}

basicHtmlReqmain.tsx1 match

@yawnxyz•Updated 11 months ago
1export default async function (req: Request): Promise<Response> {
2 const message = "HELLO HELLO";
3 return Response.json({message});

generateValCodemain.tsx2 matches

@yawnxyz•Updated 11 months ago
29 {
30 role: "user",
31 content: `Here's the description of the function I want to write:
32
33 ${description}
34
35 Please start writing the function now, and just write the function, no console.log required:
36 `,
37 },

nameOfUnicodemain.tsx1 match

@jdan•Updated 11 months ago
1import { blob } from "https://esm.town/v/std/blob?v=12";
2
3export async function nameOfCodepoint(codepoint: string) {
4 const names = await blob.getJSON("unicode_names");
5 return names[codepoint];

getFileEmail4 file matches

@shouser•Updated 2 weeks ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblk•Updated 2 weeks 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": "*",