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/$%7Bsuccess?q=function&page=1698&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 28348 results for "function"(2227ms)

vue-starter

vue-starterhttp.tsx1 match

@jxnblk•Updated 1 month ago
8);
9
10export default async function (request: Request) {
11 const html = await renderToString(<App />);
12

geminiMcpToolmain.tsx1 match

@dcm31•Updated 1 month ago
1export default async function handler(prompt: string) {
2 try {
3 const API_KEY = Deno.env.get("GEMINI_API_KEY");
preact-client-starter

preact-client-starterhttp.tsx1 match

@jxnblk•Updated 1 month ago
3import { HTML } from "./HTML.tsx";
4
5export default async function (req: Request): Promise<Response> {
6 const html = render(<HTML />);
7 return new Response(html, {

NotesNotes.md5 matches

@ianmenethil•Updated 1 month ago
13**Snippet**:
14```js
15// A simple password check function
16async function verifyPassword(password) {
17 return ["mySecret", "myBackup"].includes(password);
18}
32**Snippet**:
33```js
34async function verifyPassword(password) {
35 // Hardcoded or any custom logic
36 return password === "MyCustomSecret";
56import { passwordAuth } from "https://esm.town/v/pomdtr/password_auth?v=87";
57
58async function verifyApiToken(passwordOrToken) {
59 // Check a static password or your own token logic
60 return passwordOrToken === "mySecretAPIKey";
109**Snippet**:
110```js
111async function verifyPassword(password) {
112 return password === "testExpire";
113}
preact-starter

preact-starterhttp.tsx1 match

@jxnblk•Updated 1 month ago
8);
9
10export default async function (req: Request): Promise<Response> {
11 const html = render(<App />);
12 return new Response(html, {

esmesm.ts1 match

@maxm•Updated 1 month ago
1import mime from "npm:mime-types";
2export default async function(req: Request): Promise<Response> {
3 const url = new URL(req.url);
4 const host = url.hostname;

abundantAquamarineWoodpeckermain.tsx1 match

@maxm•Updated 1 month ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}
svg-png-starter

svg-png-starterhttp.tsx1 match

@jxnblk•Updated 1 month ago
16const png = await render(svg);
17
18export default async function (req: Request): Promise<Response> {
19 return new Response(png, {
20 headers: {

logosrebass.http.tsx3 matches

@jxnblk•Updated 1 month ago
7.bSNieN{-webkit-transform:rotate3d(1,1,1,0deg);-ms-transform:rotate3d(1,1,1,0deg);transform:rotate3d(1,1,1,0deg);width:256px;height:256px;}
8/* sc-component-id: sc-dnqmqq */
9.gAExgp{-webkit-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-animation-name:phEs,ipaUyp;animation-name:phEs,ipaUyp;-webkit-animation-duration:4s,7s;animation-duration:4s,7s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}
10/* sc-component-id: sc-iwsKbI */
11.PwswZ{-webkit-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-animation-name:gcRPJT,ipaUyp;animation-name:gcRPJT,ipaUyp;-webkit-animation-duration:4s,8s;animation-duration:4s,8s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;} /* ]]> */</style><style data-styled="phEs ipaUyp gcRPJT" data-styled-version="4.1.3">/* <![CDATA[ */
12/* sc-component-id: sc-keyframes-phEs */
13@-webkit-keyframes phEs{50%{-webkit-transform:rotate3d(0,2,1,180deg);-ms-transform:rotate3d(0,2,1,180deg);transform:rotate3d(0,2,1,180deg);}100%{-webkit-transform:rotate3d(0,2,1,360deg);-ms-transform:rotate3d(0,2,1,360deg);transform:rotate3d(0,2,1,360deg);}} @keyframes phEs{50%{-webkit-transform:rotate3d(0,2,1,180deg);-ms-transform:rotate3d(0,2,1,180deg);transform:rotate3d(0,2,1,180deg);}100%{-webkit-transform:rotate3d(0,2,1,360deg);-ms-transform:rotate3d(0,2,1,360deg);transform:rotate3d(0,2,1,360deg);}}
27`;
28
29export default async function (req: Request): Promise<Response> {
30 return new Response(svg, {
31 headers: {
2import { createCanvas } from "https://deno.land/x/canvas/mod.ts";
3
4export default async function server(request: Request): Promise<Response> {
5 // Only allow POST requests
6 if (request.method !== "POST") {
16
17 // Safely evaluate the canvas script in a controlled environment
18 const evalFunction = new Function("canvas", "ctx", canvasScript);
19 evalFunction(canvas, ctx);
20
21 // Convert canvas to PNG

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 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.