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=1667&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 17935 results for "function"(2154ms)

forwardermain.tsx1 match

@maas•Updated 1 year ago
1export function forwarder(e: {
2 from: string;
3 to: string[];

chatSampleFunctionExtractionmain.tsx3 matches

@webup•Updated 1 year ago
1import { chat } from "https://esm.town/v/webup/chat";
2
3export const chatSampleFunctionExtraction = (async () => {
4 const input =
5 `Alex is 5 feet tall. Claudia is 4 feet taller Alex and jumps higher than him. Claudia is a brunette and Alex is blonde.
11 ${input}
12 `;
13 const functions = [
14 {
15 name: "information_extraction",
37 },
38 ];
39 const response = await chat(prompt, { functions });
40 return JSON.parse(response?.arguments);
41})();

getMemoryBuildermain.tsx1 match

@webup•Updated 1 year ago
1import { getModelBuilder } from "https://esm.town/v/webup/getModelBuilder";
2
3export async function getMemoryBuilder(spec: {
4 type: "buffer" | "summary" | "vector";
5 provider?: "openai";

myApimain.tsx1 match

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

posthogStatusTrackermain.tsx1 match

@ianvph•Updated 1 year ago
7import { parseXML } from "https://esm.town/v/stevekrouse/parseXML?v=1";
8
9export async function posthogStatusTracker() {
10 // gets newest status update from rss feed
11 const statusRSSLink = "https://status.posthog.com/history.rss";

myApimain.tsx1 match

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

getYoutubeLinkFromPagemain.tsx1 match

@wilt•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getYoutubeLinkFromPage(url: string) {
4 const resp = await fetch(url);
5 const htmlText = await resp.text();

getTextmain.tsx1 match

@lolocoo•Updated 1 year ago
1export async function getText(data) {
2 console.log("hello");
3 return data;

myApimain.tsx1 match

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

myApimain.tsx1 match

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

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