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=1484&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 17288 results for "function"(2443ms)

react_framer_motion_scriptmain.tsx1 match

@tfayyaz•Updated 1 year ago
7// import "https://esm.sh/tldraw/tldraw.css";
8
9export function App() {
10 return (
11 <>

sqliteBuilderTypedmain.tsx1 match

@postpostscript•Updated 1 year ago
33 : never;
34
35export function StatementTyped<T>(
36 strings: TemplateStringsArray,
37 // @ts-ignore

tldraw_react_clientmain.tsx1 match

@andreterron•Updated 1 year ago
6import { Tldraw } from "https://esm.sh/tldraw";
7
8export function App() {
9 return (
10 <>

Appmain.tsx1 match

@tfayyaz•Updated 1 year ago
22]];
23
24export function App() {
25 return (
26 <>

BrainF_Interpretermain.tsx1 match

@ethanoscarson•Updated 1 year ago
1function interpret(code, options = {}) {
2 let {
3 tapeSize = 1024,

redFerretmain.tsx1 match

@maxm•Updated 1 year ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

classless_cssREADME.md1 match

@thierryc•Updated 1 year ago
10import { randomStyle } from "https://esm.town/v/stevekrouse/classless_css";
11
12export default async function(req: Request): Promise<Response> {
13 return new Response(`<h1>Welcome to Val Town!</h1>${randomStyle}`, {
14 headers: {

classless_cssmain.tsx2 matches

@thierryc•Updated 1 year ago
4delete frameworks[""];
5
6function absolutePath(url: string) {
7 if (url.startsWith("http")) return url;
8 else return `https://classless-css-demo.deno.dev` + url;
13export const randomStyle = `<link rel="stylesheet" href="${randomURL}">`;
14
15export default function(req: Response) {
16 const url = new URL(req.url);
17

aqimain.tsx1 match

@erosai•Updated 1 year ago
2import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI";
3
4export async function aqi(interval: Interval) {
5 const location = "prishtina"; // <-- change to place, city, or zip code
6 const data = await easyAQI({ location });

Objectmain.tsx4 matches

@curtcox•Updated 1 year ago
1const self = "this";
2
3export function follow(obj: any, chain: (string | number)[]): any {
4 let current = obj;
5
15}
16
17function trimmed(input: string): string {
18 const max = 500;
19 if (input.length <= max) {
33}
34
35export function asParts(obj: any): ObjectPart[] {
36 const objectParts: ObjectPart[] = [];
37 const record = asMap(obj);
55}
56
57export function asMap(obj: any, deep: number = 1): Record<string, any> {
58 const objectMap: Record<string, any> = {};
59

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