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=2728&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 29012 results for "function"(8377ms)

editRedirectmain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { refs } from "https://esm.town/v/stevekrouse/refs";
2
3export function editRedirect() {
4 const ref = refs()[0];
5 const editURL = `https://val.town/v/${ref.userHandle}/${ref.valName}`;

date_me_doc_helpersmain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function parseNotionDateDoc(obj): DateMeDoc {
2 return {
3 Id: obj.id,

diffHtmlmain.tsx1 match

@chet•Updated 1 year ago
2import { diffLines } from "https://esm.town/v/chet/diffLines";
3
4export function diffHtml(before: string, after: string) {
5 return diffLines(cleanHtml(before), cleanHtml(after));
6}

diffLinesmain.tsx1 match

@chet•Updated 1 year ago
1export function diffLines(before: string, after: string) {
2 const addedLines = new Set(after.split("\n"));
3 before.split("\n").forEach((line) => addedLines.delete(line));

siversRssEmailNotificationCronmain.tsx1 match

@chet•Updated 1 year ago
1import siversRssEmailNotification from "https://esm.town/v/chet/siversRssEmailNotification";
2
3export default async function(interval: Interval) {
4 await siversRssEmailNotification(interval);
5}

siversRssEmailNotificationmain.tsx1 match

@chet•Updated 1 year ago
4import { parseXML } from "https://esm.town/v/stevekrouse/parseXML";
5
6export default async function(interval: Interval) {
7 // const lastRunAt = new Date(Date.now() - 1000 * 60 * 60 * 24 * 30 * 3);
8 const lastRunAt = interval.lastRunAt;

runnermain.tsx1 match

@buttondown•Updated 1 year ago
13 "buttondown.bsky.social",
14 ];
15 const promises = ALERT_STRINGS.map(async function(keyword) {
16 let posts = await fetchJSON(
17 `https://search.bsky.social/search/posts?q=${keyword}`,

sendMsgmain.tsx1 match

@envl•Updated 1 year ago
1import { im } from "https://esm.town/v/envl/im";
2
3export async function sendMsg(req: Request) {
4 const msg = new URL(req.url).searchParams.get("msg") ?? (await req.json()).msg;
5 await im(msg);

runGistmain.tsx1 match

@pomdtr•Updated 1 year ago
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=42";
3
4export default async function (req: Request) {
5 const url = new URL(req.url);
6 const [, id, action] = url.pathname.split("/");

myApimain.tsx1 match

@chrisk_7777•Updated 1 year ago
1let { userCount } = await import("https://esm.town/v/chrisk_7777/userCount");
2
3export function myApi(name) {
4 if (!userCount) {
5 userCount = [];
tuna

tuna9 file matches

@jxnblk•Updated 21 hours ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
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.