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/$%7Bsuccess?q=function&page=1749&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 19189 results for "function"(1130ms)

solidExamplemain.tsx1 match

@rayman•Updated 1 year ago
3import { renderToString } from "npm:solid-js/web";
4
5function StlViewer() {
6 return (
7 <StlViewer

favmain.tsx1 match

@yieldray•Updated 1 year ago
3}
4
5export function fav(request: Request) {
6 const url = new URL(request.url);
7 if (url.pathname === "/")

testmain.tsx1 match

@ccallaway93•Updated 1 year ago
1export async function test() {
2 const { default: axios } = await import("npm:axios");
3 const url = "http://207.244.232.58:8011/api/login";

btcPriceAlertmain.tsx1 match

@bojan•Updated 1 year ago
5import { lastBtcPrice } from "https://esm.town/v/stevekrouse/lastBtcPrice";
6
7export async function btcPriceAlert() {
8 let btcPrice = await currency("usd", "btc");
9 let change = Math.abs(btcPrice - lastBtcPrice);

hnFollowAppmain.tsx2 matches

@bort•Updated 1 year ago
3import { hnLatestPosts } from "https://esm.town/v/stevekrouse/hnLatestPosts?v=18";
4
5export const hnFollowApp = function(authors: string[]) {
6 return async function({ lastRunAt }) {
7 let posts = await hnLatestPosts({
8 authors,

untitled_sapphireSlugmain.tsx1 match

@lolocoo•Updated 1 year ago
3const baseurl = "https://www.googleapis.com/customsearch/v1";
4
5export default async function(req: Request): Promise<Response> {
6 const { searchKey } = await req.json();
7

connect4_random_agentmain.tsx1 match

@saolsen•Updated 1 year ago
2import { connect4_agent } from "https://esm.town/v/saolsen/connect4_agent";
3
4function rand_action(state: connect4.State): connect4.Action {
5 let player = state.next_player;
6 while (true) {

connect4_agentmain.tsx1 match

@saolsen•Updated 1 year ago
5export type AsyncAgent = (state: connect4.State) => Promise<connect4.Action>;
6
7export function connect4_agent(agent: Agent | AsyncAgent) {
8 const app = new Hono();
9 app.get("/", (c) => c.json("connect4 agent"));

processFeedmain.tsx2 matches

@willthereader•Updated 1 year ago
1import { untitled_blackCrayfish } from "https://esm.town/v/stevekrouse/untitled_blackCrayfish?v=1";
2
3async function processFeed() {
4 let rssData = await untitled_blackCrayfish; // Line 1
5 console.log("Keys of rssData.rss:", Object.keys(rssData.rss)); // Log the keys of rssData.rss
24}
25
26processFeed().then(output => console.log(output)); // Call the function and print the output to the console

testEmail2main.tsx1 match

@tmcw•Updated 1 year ago
3import { testEmails } from "https://esm.town/v/stevekrouse/testEmails";
4
5export async function testEmail2(e: Email) {
6 await set("testEmails", [...testEmails, {
7 ...e,

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 3 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": "*",