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/?q=function&page=721&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 7304 results for "function"(357ms)

URLReceivermainFunctionURLReciver21 match

@willthereader•Updated 2 months ago
3import { URLCrawler } from "./urlCrawlerComponent";
4
5export async function checkWebsite(inputURL: string) {
6 const urlReceiver = new URLReceiver();
7 const urlCrawler = new URLCrawler(3);
1export default async function (e: Email) {
2
3}

salubriousVioletSeahorsetastefulTealQuail1 match

@charmaine•Updated 2 months ago
1export default async function (interval: Interval) {
2
3}

salubriousVioletSeahorsequaintGrayDolphin1 match

@charmaine•Updated 2 months ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

glowingCoffeeRaccoonusableBeigeCheetah1 match

@charmaine•Updated 2 months ago
1export default async function (req: Request): Promise<Response> {
2
3
1export default async function (e: Email) {
2
3}
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

glowingCoffeeRaccoonglamorousYellowCoyote1 match

@charmaine•Updated 2 months ago
1export default async function (interval: Interval) {
2
3}

URLReceivermainFunctionTest2 matches

@willthereader•Updated 2 months ago
1import { expect } from "jsr:@std/expect";
2import { checkWebsite } from "./mainFunctionURLReciver2";
3
4console.log("Starting Website Checker Tests");
12];
13
14async function runTests() {
15 console.log("\nTesting valid website URL");
16 let result = await checkWebsite(TEST_URLS[0]);

URLReceiversummaryURLReceiverTest7 matches

@willthereader•Updated 2 months ago
47interface TestCase {
48 description: string;
49 function: Function;
50 expectedBehavior: string;
51}
52
53function logTestInfo(message: string) {
54 console.log(` ${message}`);
55}
59 description: "Initialize generator",
60 expectedBehavior: "Should start with empty state",
61 function: () => {
62 console.log("\nTEST: Initialize generator");
63 console.log("Expected: Should start with no URLs processed\n");
83 description: "Process test URLs",
84 expectedBehavior: "Should identify working and broken URLs",
85 function: () => {
86 console.log("\nTEST: Processing multiple URLs");
87 console.log("Expected: Should correctly identify good and bad URLs\n");
124 description: "Test error handling",
125 expectedBehavior: "Should handle different types of errors",
126 function: () => {
127 console.log("\nTEST: Error handling");
128 console.log("Expected: Should identify and explain different errors\n");
182];
183
184async function runTests() {
185 console.log("Starting test run...\n");
186 let passed = 0;
189 for (const test of tests) {
190 try {
191 await test.function();
192 console.log("\n✅ TEST PASSED");
193 passed++;

getFileEmail4 file matches

@shouser•Updated 5 days ago
A helper function to build a file's email

TwilioHelperFunctions

@vawogbemi•Updated 2 months ago