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%20%22Optional%20title%22?q=function&page=2355&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 28554 results for "function"(3558ms)

val_4INpGNAf93main.tsx3 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_4INpGNAf93(req) {
3 try {
4 // Execute the code directly and capture its result
7// This demonstrates how infinite complexity can emerge from simple rules
8
9function mandelbrotPoint(x0, y0, maxIter) {
10 let x = 0;
11 let y = 0;
22}
23
24function createMandelbrotVisualization(width, height, maxIter) {
25 let visualization = '';
26 const symbols = ' .:-=+*#%@'; // Different characters for different iteration counts

val_bgSmvZkphgmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_bgSmvZkphg(req) {
3 try {
4 // Execute the code directly and capture its result
7// This demonstrates how mathematical beauty emerges in nature
8
9function createFibonacciSpiral(turns) {
10 const fib = [1, 1];
11 const spiral = [];

val_4y4XKYYOAgmain.tsx3 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_4y4XKYYOAg(req) {
3 try {
4 // Execute the code directly and capture its result
7// This demonstrates how simple mathematical rules can create complex behavior
8
9function generateLogisticMap(r, iterations, skipFirst) {
10 let x = 0.5; // Initial population
11 let results = [];
22}
23
24function visualizeResults(results, height = 20) {
25 const rows = Array(height).fill('');
26 const maxVal = 1;

val_EzhMBKOVWMmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_EzhMBKOVWM(req) {
3 try {
4 // Execute the code directly and capture its result
7// This time modeling the concept of interconnectedness and growth
8
9function createFractalTree(depth) {
10 if (depth === 0) return ['|'];
11

val_0nQm9ioJc0main.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export async function val_0nQm9ioJc0(req) {
3 try {
4 // Execute the code directly and capture its result
7// This demonstrates how complex patterns can emerge from simple rules
8
9function createCellularAutomata(size, generations) {
10 let grid = new Array(size).fill(0);
11 grid[Math.floor(size/2)] = 1; // Start with a single cell in the middle

val_bst0kyscFemain.tsx1 match

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

val_WzWC3no9LWmain.tsx1 match

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

val_NGfT1TNGLhmain.tsx1 match

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

val_ILKOorzhdBmain.tsx1 match

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

val_baxJyb52GUmain.tsx1 match

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

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.