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/$%7Burl%7D?q=function&page=1799&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 18181 results for "function"(4051ms)

myApimain.tsx1 match

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

myApimain.tsx1 match

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

FunctionToHTMLFormmain.tsx4 matches

@rodrigotello•Updated 1 year ago
1import { valForm } from "https://esm.town/v/rodrigotello/valForm";
2import { multiplicationFunctionTest } from "https://esm.town/v/rodrigotello/multiplicationFunctionTest";
3
4export async function FunctionToHTMLForm(
5 req: express.Request,
6 res: express.Response,
7) {
8 let myFunctionValAsHTML = multiplicationFunctionTest; // Insert your function here and it should generate an HTML form
9 return res.send(`${valForm(myFunctionValAsHTML)}`);
10}

timeAgomain.tsx1 match

@rodrigotello•Updated 1 year ago
1export async function timeAgo(date: Date) {
2 const { timeAgo } = await import("https://deno.land/x/time_ago/mod.ts");
3 return timeAgo(new Date(date));

vtInspoHTMLmain.tsx1 match

@rodrigotello•Updated 1 year ago
1import { valTownInspoList } from "https://esm.town/v/rodrigotello/valTownInspoList";
2
3export function vtInspoHTML(req, res) {
4 res.send(
5 valTownInspoList.map((valTownInspo) =>

valTownDailyInspomain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

@ayrtonlacerda•Updated 1 year ago
1export function myApi(req, res: express.Response) {
2 return Response.json({ ok: true });
3}

expressHTMLExamplemain.tsx1 match

@octref•Updated 1 year ago
2
3// View at https://api.val.town/v1/express/stevekrouse.expressHTMLExample?name=Steve
4export async function expressHTMLExample(req: express.Request, res: express.Response) {
5 myTestForm.push(req.query.name || req.body.name);
6 return res.send(`<h1>Hi ${req.query.name || req.body.name}!</h1>`);

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