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=1710&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 18150 results for "function"(1330ms)

buildReactDomMinifiedmain.tsx1 match

@liamdanielduffy•Updated 1 year ago
6let { REACT_DOM_MINIFIED_PT1 } = await import("https://esm.town/v/liamdanielduffy/REACT_DOM_MINIFIED_PT1");
7
8export async function buildReactDomMinified() {
9 const res = await fetch(
10 "https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js",

buildReactMinifiedmain.tsx1 match

@liamdanielduffy•Updated 1 year ago
3let { REACT_MINIFIED } = await import("https://esm.town/v/liamdanielduffy/REACT_MINIFIED");
4
5export async function buildReactMinified() {
6 let res = await fetch(
7 "https://unpkg.com/react@18/umd/react.production.min.js",

reactTodoListWebsitemain.tsx1 match

@root•Updated 1 year ago
4
5// https://api.val.town/v1/express/liamdanielduffy.reactTodoListWebsite
6export function reactTodoListWebsite(req, res) {
7 console.log(res);
8 res.set("Content-Type", "text/html");

doitmain.tsx1 match

@maksik•Updated 1 year ago
1export async function doit() {
2 console.email("Hello!", "from Val Town");
3}

webHTMLExamplemain.tsx1 match

@neverstew•Updated 1 year ago
1// View at https://neverstew-webHTMLExample.web.val.run?name=Steve
2export async function webHTMLExample(req: Request) {
3 const query = new URL(req.url).searchParams;
4 return new Response(

SearchValTownmain.tsx1 match

@pomdtr•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function SearchValTown(query: string) {
4 const input = JSON.stringify({
5 query,

myApimain.tsx1 match

@szamuboy•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

fetchCongressTradeReportsmain.tsx2 matches

@nari•Updated 1 year ago
9
10
11export async function fetchCongressTradeReports(callback) {
12 const res = await fetchJSON(
13 "https://bff.capitoltrades.com/trades?sortBy=-pubDate"
15 const trades = res.data;
16
17 function isToday(d) {
18 const now = new Date();
19 return (

foomain.tsx1 match

@tmm•Updated 1 year ago
1export async function foo() {
2 const { createPublicClient, http } = await import("npm:viem");
3 const { mainnet } = await import("npm:viem/chains");

currentDateValuesmain.tsx1 match

@tal•Updated 1 year ago
2
3// Code emulating the DOE code
4export function currentDateValues(): {
5 schoolYear: `${number}-${number}`;
6 month: string;

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": "*",