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=1735&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 19297 results for "function"(1748ms)

sqliteExplorerAppREADME.md1 match

@pomdtr•Updated 1 year ago
26- [ ] add visible output for non-query statements
27- [ ] add schema viewing
28- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers))
29- [ ] add export to sqlite
30- [ ] add refresh to table list sidebar after `CREATE/DROP/ALTER` statements

vueExamplemain.tsx1 match

@postpostscript•Updated 1 year ago
47);
48
49export default function(req: Request) {
50 return htmlResponse`
51 ${

basicDownDetectormain.tsx1 match

@agmm•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email";
2
3export async function basicDownDetector() {
4 const now = new Date();
5 const url = "https://agmm.xyz/";

ReloadScriptREADME.md1 match

@postpostscript•Updated 1 year ago
12import { ReloadScript } from "https://esm.town/v/[username]/ReloadScript";
13
14export default async function(req: Request): Promise<Response> {
15 return htmlResponse`
16 It worked!!! ${Math.random()}

headersmain.tsx1 match

@agmm•Updated 1 year ago
1export default async function(req: Request): Promise<Response> {
2 const url = new URL(req.url);
3 const headers = Object.fromEntries(req.headers.entries());

harpersmain.tsx2 matches

@visnup•Updated 1 year ago
1export default async function harpers() {
2 const { default: { load } } = await import("https://cdn.jsdelivr.net/npm/cheerio@1.0.0-rc.12/+esm");
3 const { default: { sentences } } = await import("https://cdn.jsdelivr.net/npm/sbd@1.0.19/+esm");
4 const continuations = "Who In By Of That".split(" ");
5 async function request(url) {
6 console.log(url);
7 const res = await fetch(url);

libblueskymain.tsx2 matches

@vladimyr•Updated 1 year ago
4
5// @see: https://docs.bsky.app/docs/api/com-atproto-identity-resolve-handle
6export function resolveHandle(handle: string) {
7 return ky.get("com.atproto.identity.resolveHandle", {
8 searchParams: { handle },
12
13// @see: https://docs.bsky.app/docs/api/app-bsky-feed-get-post-thread
14export function getPostThread(uri: string) {
15 return ky.get("app.bsky.feed.getPostThread", {
16 searchParams: { uri },

hybridTaggedTemplateMethodmain.tsx2 matches

@postpostscript•Updated 1 year ago
2import type { MaybePromise } from "https://esm.town/v/postpostscript/typeUtils";
3
4export function hybridTaggedTemplateMethod<
5 TResultTransformed,
6 TStringTransformed,
44}
45
46export function hybridTaggedTemplateMethodAsync<
47 TResultTransformed,
48 TStringTransformed,

fetchTweetmain.tsx2 matches

@vladimyr•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function fetchTweet(url) {
4 const tweetId = url.match(/(\d{19})/)[1];
5 const token = getToken(tweetId);
16
17// @see: https://github.com/vercel/react-tweet/blob/a292ca7/packages/react-tweet/src/api/fetch-tweet.ts#L27-L31
18function getToken(id: string) {
19 return ((Number(id) / 1e15) * Math.PI)
20 .toString(6 ** 2)

htmlAsyncREADME.md1 match

@postpostscript•Updated 1 year ago
7import { html, htmlResponseAsync } from "https://esm.town/v/postpostscript/htmlAsync";
8
9export default function(req: Request) {
10 return htmlResponseAsync`
11 ${(async () => {

getFileEmail4 file matches

@shouser•Updated 2 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
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": "*",