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/$%7Bsuccess?q=function&page=1727&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 19325 results for "function"(2514ms)

bookmarkletMdViewermain.tsx1 match

@vladimyr•Updated 1 year ago
1function run() {
2 const target = new URL(document.URL);
3 target.hostname = "vladimyr-mdviewer.web.val.run";

readmemain.tsx3 matches

@pomdtr•Updated 1 year ago
2import { gfm } from "https://esm.town/v/pomdtr/gfm";
3
4export async function readmeToHtmlResponse(author: string, name: string) {
5 return new Response(await readmeToHtml(author, name), {
6 headers: {
10}
11
12export async function readmeToHtml(author: string, name: string) {
13 const markdown = await readme(author, name);
14 return gfm(markdown);
15}
16
17export async function readme(author: string, name: string) {
18 const { readme } = await api(`/v1/alias/${author}/${name}`);
19 return readme;

sqliteBackupIntervalmain.tsx2 matches

@postpostscript•Updated 1 year ago
2import { email } from "https://esm.town/v/std/email?v=11";
3
4export async function sqliteBackupWithEmail() {
5 const { name, content } = await sqliteBackup();
6 return email({
17}
18
19export default function() {
20 return sqliteBackupWithEmail();
21}

weatherGPTmain.tsx1 match

@liaolile•Updated 1 year ago
28console.log(text);
29
30export async function weatherGPT() {
31 const result = await fetch(`https://hello.liaolile.com/test/weather`, {
32 method: "POST",

jadeCodmain.tsx1 match

@u•Updated 1 year ago
1export async function handlePlexWebhook(req: Request) {
2 console.log(await req.text());
3}

umdImportmain.tsx2 matches

@easrng•Updated 1 year ago
1export async function umdImport(url: string | URL, globals = {}) {
2 const res = await fetch(url);
3 if (!res.ok) throw new Error(await res.text());
16 },
17 });
18 new Function("module", "exports", "global", ...Object.keys(globals), code)(
19 module,
20 module.exports,

bookmarkletPostEvalmain.tsx1 match

@vladimyr•Updated 1 year ago
1function run() {
2 window.location = new URL(`/${document.URL}`, "https://vladimyr-posteval.web.val.run/");
3}

bookmarkletsmain.tsx1 match

@vladimyr•Updated 1 year ago
8const app = new Hono();
9
10async function bookmarkletUrl(author: string, name: string) {
11 const { code } = await api(`/v1/alias/${author}/${name}`);
12 const { code: minifedCode } = await minify(`(${code})();`);

bookmarkletEsmTownmain.tsx1 match

@vladimyr•Updated 1 year ago
1function run() {
2 const target = new URL(document.URL);
3 target.hostname = "esm.town";

bookmarkletsREADME.md1 match

@vladimyr•Updated 1 year ago
5## Usage
6
7You val should export an anonymous function, containing the code that will run when the bookmarklet is triggered.
8
9```typescript

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.