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=2366&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 24554 results for "function"(1559ms)

valToStringmain.tsx1 match

@pomdtr•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function valToString(val: string) {
4 if (val.startsWith("@")) {
5 val = val.slice(1);

remembermain.tsx1 match

@mxderouet•Updated 1 year ago
1export let remember = function () {
2 console.email("Remember to try val.town for Weather Bot");
3};

myApimain.tsx1 match

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

setEmailsmain.tsx1 match

@eric•Updated 1 year ago
1let { emails } = await import("https://esm.town/v/eric/emails");
2
3export let setEmails = function(emailSet) {
4 emails = [...emailSet.values()]
5 return emails.length

testPostCallmain.tsx1 match

@mehmet•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function testPostCall() {
4 const result = await fetchJSON(
5 "https://api.val.town/express/@stevekrouse.postWebhook1",

exchangeCurrencymain.tsx1 match

@mgruel•Updated 1 year ago
7 * @param {string} base - The base currency, from which the exchange should be calculated
8 */
9export async function exchangeCurrency(
10 desired: string,
11 amount = 1,

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

pingHttpmain.tsx1 match

@robin•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function pingHttp(url: string) {
4 try {
5 const res = await fetch(url);

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 1 month 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.