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=1550&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 18129 results for "function"(2886ms)

lastloginREADME.md1 match

@pomdtr•Updated 11 months ago
48```
49
50You can allow anyone to signup by returning a boolean from the verifyEmail function:
51
52```ts

exampleHTTPmain.tsx1 match

@stevekrouse•Updated 11 months ago
1export function handler(request: Request) {
2 return Response.json({ ok: true });
3}

pyodideExecutormain.tsx2 matches

@iamseeley•Updated 11 months ago
1async function installPackages(pyodide: any, code: string) {
2 const importStatements = code.match(/import (\w+)|from (\w+)/g);
3 const packages = new Set<string>();
37}
38
39export async function executePython(pyodide: any, code: string) {
40 await installPackages(pyodide, code);
41 return await pyodide.runPythonAsync(code);

rawmain.tsx2 matches

@pomdtr•Updated 11 months ago
3import { readmeToHtmlResponse } from "https://esm.town/v/pomdtr/readme";
4
5async function createScreenshot(code: string) {
6 const apiUrl = "https://sourcecodeshots.com/api/image";
7 const resp = await fetch(apiUrl, {
19}
20
21export default async function raw(req: Request) {
22 const url = new URL(req.url);
23 const [_, author, file] = url.pathname.slice(1).split("/");

cors_proxymain.tsx1 match

@adrienj•Updated 11 months ago
6};
7
8export default async function(req: Request): Promise<Response> {
9 // Check if the request is an OPTIONS request
10 if (req.method === "OPTIONS") {

esmTownmain.tsx1 match

@jdan•Updated 11 months ago
3import { Hono } from "npm:hono@3";
4
5function esmTown(url) {
6 return fetch(url, {
7 headers: {

getAllWordsmain.tsx1 match

@jdan•Updated 11 months ago
1import { blob } from "https://esm.town/v/std/blob?v=12";
2
3export async function getAllWords(): Promise<string[]> {
4 const allWords = await blob.getJSON("words") as string[];
5 return allWords;

milligramCssmain.tsx1 match

@xkonti•Updated 11 months ago
1import { Page } from "https://esm.town/v/xkonti/htmlBuilder";
2
3export function addMilligram(page: Page): Page {
4 stylesheets.forEach(url => {
5 page.addStylesheet(url);

wordsMatchingmain.tsx1 match

@jdan•Updated 11 months ago
1import { getAllWords } from "https://esm.town/v/jdan/getAllWords";
2
3export async function wordsMatching(input: string) {
4 // the count of each letter in the input
5 const inputCount = input

pyodideDataVismain.tsx1 match

@iamseeley•Updated 11 months ago
16
17 <script>
18 async function main() {
19 let pyodide = await loadPyodide();
20 await pyodide.loadPackage('numpy');

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 2 weeks ago
Simple functional CSS library for Val Town
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
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": "*",