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/image-url.jpg%20%22Image%20title%22?q=function&page=1853&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 18869 results for "function"(1670ms)

doeMenuCalendarmain.tsx1 match

@tal•Updated 1 year ago
5import { currentDateValues } from "https://esm.town/v/tal/currentDateValues";
6
7export async function doeMenuCalendar(req: Request) {
8 const url = new URL(req.url);
9 const menuType = url.pathname.substring(1);

testHTMLmain.tsx1 match

@tr3ntg•Updated 1 year ago
1export function testHTML(req: express.Request, res: express.Response) {
2 res.send(
3 "<html lang='en'>" +

untitled_silverGoosemain.tsx1 match

@tr3ntg•Updated 1 year ago
3
4export const untitled_silverGoose = (async () => {
5 async function saveTickerToSupabase(request) {
6 const { createClient } = await import(
7 "https://esm.sh/@supabase/supabase-js@2"

myApimain.tsx1 match

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

myApimain.tsx1 match

@feynman•Updated 1 year ago
1export async function myApi(name) {
2 const got = await import("got");
3 const res = await got.post("http://34.87.31.113:3000/infer", {

ulidmain.tsx2 matches

@josephscott•Updated 1 year ago
44 let dest = new Array(26);
45
46 function encode(ulid) {
47 dest[0] = BASE32[ulid[0] >> 5];
48 dest[1] = BASE32[(ulid[0] >> 0) & 0x1f];
64 }
65
66 return function () {
67 let now = Date.now();
68 if (now === last) {

testHtmlmain.tsx1 match

@healeycodes•Updated 1 year ago
1export let testHtml = function (req, res) {
2 res.send("<html><h1>hi!</h1></html>");
3};
1import { interactiveBrokersMargins2Table } from "https://esm.town/v/simone/interactiveBrokersMargins2Table";
2
3export async function interactiveBrokersMargins2Rendered(req, res) {
4 res.send(await interactiveBrokersMargins2Table());
5}

hnFollowPollJobTestmain.tsx1 match

@andreterron•Updated 1 year ago
3import { hnLatestPosts } from "https://esm.town/v/stevekrouse/hnLatestPosts?v=18";
4
5export async function hnFollowPollJobTest(interval: Interval) {
6 let posts = await hnLatestPosts({
7 authors: hackerNewsAuthors,

fetchTwitterUsermain.tsx1 match

@andreterron•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function fetchTwitterUser({ id, accessToken, query = "" }: {
4 id: string;
5 accessToken: string;

getFileEmail4 file matches

@shouser•Updated 2 weeks 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": "*",