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=1686&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 18261 results for "function"(2808ms)

htmlmain.tsx1 match

@hussseinkizz•Updated 1 year ago
1export function html(strings, ...values) {
2 let result = '';
3 strings.forEach((string, i) => {

exampleServermain.tsx1 match

@pomdtr•Updated 1 year ago
1export function exampleServer(req) {
2 return new Response("<h1>Hello World</h1>", {
3 headers: {

lookupmain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { httpRegex } from "https://esm.town/v/stevekrouse/httpRegex";
2
3export function lookup(req) {
4 try {
5 let url = new URL(req.url);

aEmailmain.tsx1 match

@taufiq•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=9";
2
3export async function aEmail(e: Email) {
4 return email({ to: e.from, text: "Stop emailing me" });
5}

aHandlermain.tsx2 matches

@taufiq•Updated 1 year ago
1import { reactExample } from "https://esm.town/v/stevekrouse/reactExample?v=0";
2import { aFunction } from "https://esm.town/v/taufiq/aFunction";
3
4export async function aHandler(request: Request): Promise<Response> {
5 return reactExample();
6}

getPublicKeymain.tsx1 match

@stevekrouse•Updated 1 year ago
1export async function getPublicKey(handle) {
2 let { publicKey } = await import(`/v/${handle}/publicKey`);
3 return publicKey;

runValAPImain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function runValAPI(name, ...args) {
2 return fetch(`https://api.val.town/v1/run/${name.replace("@", "")}`, {
3 method: "POST",

tursomain.tsx1 match

@std•Updated 1 year ago
5type createClient = Awaited<ReturnType<typeof tursoImport>>["createClient"];
6
7export function turso(keys, handle?) {
8 let val = "@std.tursoAPI";
9 let f = (method) => (...args) =>
1import { synesthesiacounter } from "https://esm.town/v/politelyinvinciblepointer/synesthesiacounter";
2
3export function getsynesthesiacounter() {
4 return synesthesiacounter;
5}

vanPlatemain.tsx1 match

@pomdtr•Updated 1 year ago
1export function vanPlate() {
2 type Primitive = string | number | boolean | bigint;
3 interface Props {

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