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=931&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 18155 results for "function"(1358ms)

valentinemain.tsx3 matches

@krithik•Updated 2 months ago
13];
14
15function App() {
16 const [noClicks, setNoClicks] = useState(0);
17 const [isValentine, setIsValentine] = useState(false);
98}
99
100function client() {
101 createRoot(document.getElementById("root")).render(<App />);
102}
103if (typeof document !== "undefined") { client(); }
104
105export default async function server(request: Request): Promise<Response> {
106 return new Response(
107 `

Forevermain.tsx3 matches

@djay•Updated 2 months ago
13];
14
15function App() {
16 const [noClicks, setNoClicks] = useState(0);
17 const [isValentine, setIsValentine] = useState(false);
98}
99
100function client() {
101 createRoot(document.getElementById("root")).render(<App />);
102}
103if (typeof document !== "undefined") { client(); }
104
105export default async function server(request: Request): Promise<Response> {
106 return new Response(
107 `

MySolesamain.tsx3 matches

@dwadonjay•Updated 2 months ago
13];
14
15function App() {
16 const [noClicks, setNoClicks] = useState(0);
17 const [isValentine, setIsValentine] = useState(false);
98}
99
100function client() {
101 createRoot(document.getElementById("root")).render(<App />);
102}
103if (typeof document !== "undefined") { client(); }
104
105export default async function server(request: Request): Promise<Response> {
106 return new Response(
107 `

loveyoumain.tsx3 matches

@mewtru•Updated 2 months ago
4import React from "https://esm.sh/react@18.2.0";
5
6function App() {
7 const draw = {
8 hidden: { pathLength: 0, opacity: 0 },
128}
129
130function client() {
131 ReactDOM.createRoot(document.getElementById("root")!).render(<App />);
132}
133if (typeof document !== "undefined") { client(); }
134
135export default async function server(request: Request): Promise<Response> {
136 return new Response(
137 `

chatgptmain.tsx1 match

@mtz•Updated 2 months ago
91};
92
93export default async function server(request: Request): Promise<Response> {
94 const url = new URL(request.url);
95 const searchParams = url.searchParams;

digestupdateNews3 matches

@joseforonda•Updated 2 months ago
4import { blob } from "https://esm.town/v/std/blob";
5
6export async function updateNews(sources: string[], newsBlob: string = "news", descMaxLength: number = 400) {
7 // Update news stored in a blob
8
26}
27
28async function fetchSource(url: string, oldItems: any, descMaxLength: number) {
29 // Fetch a source, filter unseen news items
30 console.log(`fetch: ${url}`);
31
32 function parseDescription(description: string, maxlength: number) {
33 // Format a news item description
34

curatedotfun_feedrss-service1 match

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

valTownBlogRSSmain.tsx1 match

@elliotbraem•Updated 2 months ago
2import { valTownBlogJSON } from "https://esm.town/v/stevekrouse/valTownBlogJSON";
3
4export async function valTownBlogRSS() {
5 const json = await valTownBlogJSON();
6 return new Response(dataToRSS(

specialGreenWhippetmain.tsx1 match

@junhoca•Updated 2 months ago
1// @public
2export async function GET() {
3 return new Response(html, {
4 headers: {

stellarCoralGoatmain.tsx1 match

@junhoca•Updated 2 months ago
1
2// @public
3export async function GET() {
4 return new Response(html, {
5 headers: {

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