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/$%7Burl%7D?q=function&page=2614&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 28936 results for "function"(3454ms)

linkInBioTemplatemain.tsx1 match

@morsczx•Updated 12 months ago
2import { renderToString } from "npm:react-dom/server";
3
4export default async function(req: Request) {
5 return new Response(
6 renderToString(

dateme_faqmain.tsx1 match

@stevekrouse•Updated 12 months ago
6let linkClass = "text-sky-600 hover:text-sky-500";
7
8export default function FAQ(c) {
9 return c.html(
10 <Layout activeTab={new URL(c.req.url).pathname}>

copperMammalREADME.md1 match

@jamisonl•Updated 12 months ago
1Bot for Cama discord server. To initialize new slash commands, you have to run a separate bit of code. This is for modifying their functionality

robPikeIOmain.tsx2 matches

@maxm•Updated 12 months ago
1const msg = new TextEncoder().encode("💩");
2const initialDelay = 20;
3export default async function(req: Request): Promise<Response> {
4 let timerId: number | undefined;
5 const body = new ReadableStream({
6 start(controller) {
7 let currentDelay = initialDelay;
8 function writeToStream() {
9 currentDelay *= 1.03;
10 controller.enqueue(msg);

dateme_layout_reactmain.tsx1 match

@stevekrouse•Updated 12 months ago
7
8const tabs = { "/": "Home", "/browse": "Browse", "/faq": "FAQ" };
9export default function() {
10 const navigation = useNavigation();
11 return (

endlessMazeStreammain.tsx1 match

@maxm•Updated 12 months ago
1const msg = new TextEncoder().encode("💩");
2const delay = 10;
3export default async function(req: Request): Promise<Response> {
4 let timerId: number | undefined;
5 const body = new ReadableStream({

MADBOTSmain.tsx1 match

@jonbo•Updated 12 months ago
3const DISCORD_WEBHOOK = Deno.env.get("DISCORD_TANAKI_WEBHOOK");
4
5export default async function(interval: Interval) {
6 const supabase = createClient(
7 Deno.env.get("TANAKI_SUPABASE_URL"),

MADBOTSREADME.md1 match

@jonbo•Updated 12 months ago
1# MAD BOTS (Multi-functional Alerting & Diagnostics Bot Operations Tracking System)
2
3This val runs every two minutes and makes sure a supabase realtime websocket listener is still alive.

typewritermain.tsx2 matches

@iamseeley•Updated 12 months ago
1export function typeWriter(element, text, callback = () => {}) {
2 let i = 0;
3 function type() {
4 if (i < text.length) {
5 element.textContent += text.charAt(i);

typingClimain.tsx2 matches

@iamseeley•Updated 12 months ago
1export function typingCli(element, text, callback = () => {}) {
2 let i = 0;
3 function type() {
4 if (i < text.length) {
5 const span = document.createElement('span');
tuna

tuna9 file matches

@jxnblk•Updated 16 hours ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
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.