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?q=function&page=26&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 35255 results for "function"(1916ms)

flixdbNoteForm.tsx1 match

@fxfr•Updated 1 day ago
6}
7
8export default function NoteForm({ onSubmit }: NoteFormProps) {
9 const [note, setNote] = useState('');
10 const [loading, setLoading] = useState(false);

flixdbLoginForm.tsx1 match

@fxfr•Updated 1 day ago
7}
8
9export default function LoginForm({ onLogin }: LoginFormProps) {
10 const [email, setEmail] = useState('');
11 const [password, setPassword] = useState('');

emergent-agentmain.tsx5 matches

@join•Updated 1 day ago
90};
91
92// --- HELPER FUNCTIONS ---
93async function callOpenAI(messages, response_format = { type: "text" }) {
94 const openai = new OpenAI();
95 const completion = await openai.chat.completions.create({
107const cacheStore = new Map();
108
109function customMemoryCache(options: {
110 keyGenerator: (c: any) => string;
111 maxAge: number; // maxAge in seconds
112}) {
113 return async function cache(c, next) {
114 const key = options.keyGenerator(c);
115 const cached = cacheStore.get(key);
354
355// Garbage Collection - unchanged
356export async function cleanupExpiredTasks() {
357 // ...
358}

emergentmain.tsx3 matches

@join•Updated 2 days ago
50
51// --- FRONTEND: The Emergent UI (Unchanged) ---
52function generateHtml(sourceUrl) {
53 return `
54 <!DOCTYPE html>
172 };
173
174 async function downloadPdf() {
175 const { jsPDF } = window.jspdf;
176 const finalDocElement = getEl('final-document');
329const app = new Hono();
330
331async function callOpenAI(c, messages, response_format = { type: "text" }) {
332 const openai = new OpenAI();
333 const completion = await openai.chat.completions.create({

untitled-3883rss-ventureburn.tsx1 match

@souravvmishra•Updated 2 days ago
1export default async function(interval: Interval) {
2 try {
3 const res = await fetch("https://b-24-news-api.onrender.com/rss-to-news", {

untitled-3883rss-ventureboat.tsx1 match

@souravvmishra•Updated 2 days ago
1export default async function (interval: Interval) {
2 try {
3 const res = await fetch("https://b-24-news-api.onrender.com/rss-to-news", {

untitled-3883rss-uktechnews.tsx1 match

@souravvmishra•Updated 2 days ago
1export default async function (interval: Interval) {
2 try {
3 const res = await fetch("https://b-24-news-api.onrender.com/rss-to-news", {

untitled-3883rss-techsauce.tsx1 match

@souravvmishra•Updated 2 days ago
1export default async function (interval: Interval) {
2 try {
3 const res = await fetch("https://b-24-news-api.onrender.com/rss-to-news", {

untitled-3883rss-technode.tsx1 match

@souravvmishra•Updated 2 days ago
1export default async function (interval: Interval) {
2 try {
3 const res = await fetch("https://b-24-news-api.onrender.com/rss-to-news", {

untitled-3883rss-techinasia.tsx1 match

@souravvmishra•Updated 2 days ago
1export default async function (interval: Interval) {
2 try {
3 const res = await fetch("https://b-24-news-api.onrender.com/rss-to-news", {

discordWebhook2 file matches

@stevekrouse•Updated 3 weeks ago
Helper function to send Discord messages
tuna

tuna9 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.