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=675&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 7802 results for "function"(483ms)

unassumingMaroonEarthwormwebpage1 match

@stevedylandev•Updated 1 month ago
4import getUrl from "./sdk";
5
6export default async function(req: Request): Promise<Response> {
7 const url = await getUrl();
8 return html(renderToString(

unassumingMaroonEarthwormsdk1 match

@stevedylandev•Updated 1 month ago
6});
7
8export default async function getUrl() {
9 const url = await pinata.gateways.convert("QmVLwvmGehsrNEvhcCnnsw5RQNseohgEkFNN1848zNzdng");
10 return url;

PetconREADME.md1 match

@Zeeshanshaikh2•Updated 1 month ago
19 setLoading(true);
20 if (!onLogin) {
21 setError("Login function is missing.");
22 setLoading(false);
23 return;

feedbinStarsRSSFeedgetStarFeed1 match

@mcwhittemore•Updated 1 month ago
1import starFeed from "./starFeed";
2export default async function(req: Request): Promise<Response> {
3 const feed = await starFeed();
4 return new Response(feed, {

feedbinStarsRSSFeedfeedbinAPI3 matches

@mcwhittemore•Updated 1 month ago
1import { rawFetch } from "https://esm.town/v/std/rawFetch";
2
3export async function getStars() {
4 return await feedbinFetch("https://api.feedbin.com/v2/starred_entries.json", {});
5}
6
7export function getEntry(entryId: number) {
8 return feedbinFetch(`https://api.feedbin.com/v2/entries/${entryId}.json`, {});
9}
10
11async function feedbinFetch(url: string, opts: any) {
12 try {
13 const username = Deno.env.get("FEEDBIN_USER");
GitHubSync

GitHubSyncREADME.md1 match

@jxnblk•Updated 1 month ago
42const url = Deno.env.get("PUSH_URL") as string;
43
44async function pushValsToGitHub() {
45 const body = "hello";
46 const signature = await sign(body, secret);

replicate_starterApp.tsx1 match

@replicate•Updated 1 month ago
3import React from "https://esm.sh/react@18.2.0";
4
5function ImageGenerator() {
6 const [prompt, setPrompt] = React.useState("");
7 const [images, setImages] = React.useState<any>([]);

BraintrustSDKtutorial1 match

@tkneisly•Updated 1 month ago
3import { Eval } from "npm:braintrust";
4
5export default async function handler() {
6 const result = {
7 apiKeyStatus: null,

digestupdateNews3 matches

@joseforonda•Updated 1 month ago
4import { blob } from "https://esm.town/v/std/blob";
5
6export async function updateNews(sources: string[], newsBlob: string = "news", descMaxLength: number = 400) {
7 // Update news stored in a blob
8
26}
27
28async function fetchSource(url: string, oldItems: any, descMaxLength: number) {
29 // Fetch a source, filter unseen news items
30 console.log(`fetch: ${url}`);
31
32 function parseDescription(description: string, maxlength: number) {
33 // Format a news item description
34

curatedotfun_feedrss-service1 match

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

getFileEmail4 file matches

@shouser•Updated 6 days ago
A helper function to build a file's email

TwilioHelperFunctions

@vawogbemi•Updated 2 months ago