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=1914&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 19591 results for "function"(1141ms)

myApimain.tsx1 match

@wonday•Updated 1 year ago
1import { name as name2 } from "https://esm.town/v/wonday/name";
2
3export function myApi(name) {
4 return `hi ${name}! my name is ${name2}`;
5}

myApimain.tsx1 match

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

myApimain.tsx1 match

@mss•Updated 1 year ago
1export function myApi(name) {
2 console.email("hello " + name);
3 return "hello " + name;

tatatutumain.tsx1 match

@VictorForissier•Updated 1 year ago
1export function tatatutu() {
2 console.email("this is the body");
3}

myApimain.tsx1 match

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

sha256OfTextmain.tsx1 match

@jdan•Updated 1 year ago
1export async function sha256OfText(text: string) {
2 // https://stackoverflow.com/a/48161723/712889
3 const textBuffer = new TextEncoder().encode(text);

chatSampleFunctionTaggingmain.tsx3 matches

@webup•Updated 1 year ago
1import { chat } from "https://esm.town/v/webup/chat";
2
3export const chatSampleFunctionTagging = (async () => {
4 const input =
5 "Estoy increiblemente contento de haberte conocido! Creo que seremos muy buenos amigos!";
9 ${input}
10 `;
11 const functions = [
12 {
13 name: "information_extraction",
24 },
25 ];
26 const response = await chat(prompt, { functions });
27 return JSON.parse(response?.arguments);
28})();

myApimain.tsx1 match

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

valTownDailyInspomain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { valTownInspirationEmail } from "https://esm.town/v/rodrigotello/valTownInspirationEmail?v=79";
2
3export async function valTownDailyInspo() {
4 return await valTownInspirationEmail();
5}

emailGPT3main.tsx1 match

@stevekrouse•Updated 1 year ago
3import { runVal } from "https://esm.town/v/std/runVal";
4
5export async function emailGPT3(email) {
6 let response = await runVal("patrickjm.gpt3", { prompt: email.text });
7 return mail({

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 3 weeks ago
Simple functional CSS library for Val Town
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.