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/$%7Bart_info.art.src%7D?q=function&page=1589&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 20677 results for "function"(1235ms)

val_IqQ0SMdyJQmain.tsx1 match

@dhvanil•Updated 6 months ago
1
2 export async function val_IqQ0SMdyJQ(req) {
3 try {
4 // Execute the code directly

val_DxjKDGJFD8main.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_DxjKDGJFD8(req) {
3 try {
4 // Create a function from the provided code and execute it
5 const userCode = async () => {
6 return const findPrimes = (n) => {

val_7Uzsz0je4qmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_7Uzsz0je4q(req) {
3 try {
4 // Create a function from the provided code and execute it
5 const userCode = async () => {
6 return const findPrimes = (n) => {

val_wLqQaKIA8emain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_wLqQaKIA8e(req) {
3 try {
4 // Create a function from the provided code and execute it
5 const userCode = async () => {
6 return const findPrimes = (n) => {

val_W1jVyebeTJmain.tsx4 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_W1jVyebeTJ(req) {
3 try {
4 // Ensure request body is consumed
5 const body = await req.text();
6
7 // Create a function from the provided code and execute it
8 const userFunction = async () => {
9 const findPrimes = (n) => {
10 const primes = [];
28
29 // Execute and capture the result
30 const result = await userFunction();
31
32 // Handle different types of results

val_dDDB0hjTShmain.tsx4 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_dDDB0hjTSh(req) {
3 try {
4 // Ensure request body is consumed
5 const body = await req.text();
6
7 // Create a function from the provided code and execute it
8 const userFunction = async () => {
9 const findPrimes = (n) => {
10 const primes = [];
28
29 // Execute and capture the result
30 const result = await userFunction();
31
32 // Handle different types of results

val_h71QOVqMsfmain.tsx4 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_h71QOVqMsf(req) {
3 try {
4 // Ensure request body is consumed
5 const body = await req.text();
6
7 // Create a function from the provided code and execute it
8 const userFunction = async () => {
9 const findPrimes = (n) => {
10 const primes = [];
28
29 // Execute and capture the result
30 const result = await userFunction();
31
32 // Handle different types of results

val_P5Jos9W9mMmain.tsx4 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_P5Jos9W9mM(req) {
3 try {
4 // Ensure request body is consumed
5 const body = await req.text();
6
7 // Create a function from the provided code and execute it
8 const userFunction = async () => {
9 const findPrimes = (n) => {
10 const primes = [];
28
29 // Execute and capture the result
30 const result = await userFunction();
31
32 // Handle different types of results

val_5OBYpMAcsJmain.tsx4 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_5OBYpMAcsJ(req) {
3 try {
4 // Ensure request body is consumed
5 const body = await req.text();
6
7 // Create a function from the provided code and execute it
8 const userFunction = async () => {
9 const findPrimes = (n) => {
10 const primes = [];
28
29 // Execute and capture the result
30 const result = await userFunction();
31
32 // Handle different types of results

val_QNCsjRvGfnmain.tsx5 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_QNCsjRvGfn(req) {
3 try {
4 // Ensure request body is consumed
5 const body = await req.text();
6
7 // Create a function from the provided code and execute it
8 const userFunction = async () => {
9 function findPrimes(limit) { const primes = []; for (let num = 2; num < limit; num++) { let isPrime = true; for (let i = 2; i <= Math.sqrt(num); i++) { if (num % i === 0) { isPrime = false; break; } } if (isPrime) { primes.push(num); } } return primes; } findPrimes(10);
10 };
11
12 // Execute and capture the result
13 const result = await userFunction();
14
15 // Handle different types of results

getFileEmail4 file matches

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

tuna8 file matches

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