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%22Optional%20title%22?q=function&page=2829&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 29117 results for "function"(5720ms)

chatmain.tsx1 match

@steveb1313•Updated 1 year ago
22 });
23 const message = data.choices[0].message;
24 return message.function_call ? message.function_call : message.content;
25};

homemain.tsx1 match

@dedes•Updated 1 year ago
5import { getHome } from "https://esm.town/v/dedes/getHome";
6
7export async function home(req: express.Request, res: express.Response) {
8 try {
9 const currentPage = req.query.page || "home";

usgsSitemain.tsx1 match

@eczajk•Updated 1 year ago
1import { fetchXML } from "https://esm.town/v/stevekrouse/fetchXML?v=3";
2
3export async function usgsSite(site) {
4 const result = await fetchXML(
5 `http://waterservices.usgs.gov/nwis/iv/?site=${site}`

greetmain.tsx1 match

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

captureCalendlyWebhookmain.tsx1 match

@ianvph•Updated 1 year ago
2import { capturePostHogEvent } from "https://esm.town/v/ianvph/capturePostHogEvent";
3
4export async function captureCalendlyWebhook(req: Request) {
5 let reqJson = await req.json();
6 console.log(reqJson);

promptChatGPTmain.tsx1 match

@fadi•Updated 1 year ago
1import { runVal } from "https://esm.town/v/std/runVal";
2
3export function promptChatGPT(prompt) {
4 const gptResponse = runVal("patrickjm.gpt3", {
5 prompt: prompt,

decomposeGlideWebhookParamsmain.tsx1 match

@markprobst•Updated 1 year ago
1export function decomposeGlideWebhookParams(params, names) {
2 const results = [];
3 for (const name of names) {

myApimain.tsx1 match

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

createQdrantCollectionmain.tsx1 match

@wilt•Updated 1 year ago
5 * Uses recommended values for OpenAPI embeddings
6 */
7export async function createQdrantCollection(args: {
8 collectionName: string;
9 qdrantKey: string;

sendRandomChihuahuaToSlackmain.tsx1 match

@metart43•Updated 1 year ago
2import process from "node:process";
3
4export async function sendRandomChihuahuaToSlack() {
5 const dogAPIURL = new URL(
6 "https://dog.ceo/api/breed/chihuahua/images/random",
tuna

tuna9 file matches

@jxnblk•Updated 1 day ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
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": "*",
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.