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=1723&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 18010 results for "function"(2249ms)

getInformationOfTheGitHubReposirotymain.tsx1 match

@tzq•Updated 1 year ago
2import { fetchJSON } from "https://esm.town/v/dvergin/fetchJSON?v=2";
3
4export async function getInformationOfTheGitHubReposiroty(repository) {
5 return await fetchJSON(`https://api.github.com/repos/${repository}`, {
6 headers: {

coolHnPostsmain.tsx1 match

@VictorForissier•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function coolHnPosts(id) {
4 return fetch("https://hn.algolia.com/api/v1/search_by_date?tags=author_" + id)
5 .then((res) => res.json())

myApimain.tsx1 match

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

myApimain.tsx1 match

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

retThismain.tsx1 match

@serna•Updated 1 year ago
1import { retThat } from "https://esm.town/v/serna/retThat";
2
3export async function retThis() {
4 return await retThat();
5}

retrieverSampleSelfQuerymain.tsx3 matches

@webup•Updated 1 year ago
11 "npm:langchain/retrievers/self_query"
12 );
13 const { FunctionalTranslator } = await import(
14 "npm:langchain/retrievers/self_query/functional"
15 );
16 /**
108 * attributes you want to query on.
109 */
110 structuredQueryTranslator: new FunctionalTranslator(),
111 });
112 /**

myApimain.tsx1 match

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

GetPelotonWorkoutsmain.tsx1 match

@steveb1313•Updated 1 year ago
2import process from "node:process";
3
4export async function GetPelotonWorkouts(
5 req: express.Request,
6 res: express.Response,

myApimain.tsx1 match

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

incrementmain.tsx1 match

@_•Updated 1 year ago
1let { count } = await import("https://esm.town/v/_/count");
2
3export function increment() {
4 count += 1;
5 return count;

getFileEmail4 file matches

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

tuna8 file matches

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