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=1766&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 18191 results for "function"(3395ms)

renderTopStoriesmain.tsx1 match

@iakovos•Updated 1 year ago
1import { getUrlHostname } from "https://esm.town/v/iakovos/getUrlHostname";
2
3export function renderTopStories(stories: {
4 id: number;
5 title: string;

questionsWithGuidelinesChainmain.tsx1 match

@jacoblee93•Updated 1 year ago
37 .pipe(new StringOutputParser());
38 // RunnableSequence.from() is equivalent to `.pipe().pipe()`
39 // but will coerce objects (and functions) into runnables
40 const questionStyleChain = RunnableSequence.from([
41 {

currentCommuteAlertMessagesmain.tsx1 match

@roop•Updated 1 year ago
2import { fetchAlerts } from "https://esm.town/v/roop/fetchAlerts";
3
4export async function currentCommuteAlertMessages() {
5 const alerts = (await fetchAlerts()).entity;
6 const filtered = filterAlertsByLineAndStation(alerts);

myApimain.tsx1 match

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

myApimain.tsx1 match

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

getLemmyPostsmain.tsx2 matches

@pdebie•Updated 1 year ago
1// This tries to fetch a specific post on multiple Lemmpy instances
2// and can try to fix missing comments on a specific instance.
3export async function getLemmyPosts(instance: string, communityName: string) {
4 const { LemmyHttp } = await import("npm:lemmy-js-client");
5 let client = new LemmyHttp(`https://${instance}`, {
6 fetchFunction: fetch,
7 });
8 const { posts } = await client.getPosts({

api500main.tsx1 match

@matthamlin•Updated 1 year ago
1export function api500(req: express.Request, res: express.Response) {
2 res.status(503);
3 res.json({

api400main.tsx1 match

@matthamlin•Updated 1 year ago
1export function api400(req: express.Request, res: express.Response) {
2 res.status(400);
3 res.json({

myApimain.tsx1 match

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

testHTMLmain.tsx1 match

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

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