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=4&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 7147 results for "function"(228ms)

Discord bot626 words

https://docs.val.town/integrations/discord/how-to-make-a-discord-bot-hosted-24-7-for-free-in-/
is a social website to write, run, and host JavaScript. You can create APIs, scheduled functions, email yourself, and persist small pieces of data — all from the browser and

Sections

Step 3: Login to Val Town

Step 3: Login to Val Town. Val Town is a social website to write, run, and host JavaScript. You can create APIs, scheduled functions, email yourself, and persist small pieces

Permissions966 words

https://docs.val.town/reference/permissions/
Town Discord notification. // Translates one kind of webhook (Clerk) into another (Discord). export async function handleDiscordNewUser(req: express.Request, res) { // check custom auth secret sent from clerk. if (req.get("auth")

Sections

Custom Authentication

Town Discord notification. // Translates one kind of webhook (Clerk) into another (Discord). export async function handleDiscordNewUser(req: express.Request, res) { // check custom auth secret sent from clerk. if (req.get("auth")

CTGBreakerneynar.ts7 matches

@horsefacts•Updated 13 hours ago
1const baseUrl = "https://api.neynar.com/v2/farcaster/";
2
3export async function fetchNeynarGet(path: string) {
4 const res = await fetch(baseUrl + path, {
5 method: "GET",
14}
15
16export function fetchUser(username: string) {
17 return fetchNeynarGet(`user/by_username?username=${username}`).then(r => r.user);
18}
19export function fetchUsersById(fids: string) {
20 return fetchNeynarGet(`user/bulk?fids=${fids}`).then(r => r.users);
21}
22
23export function fetchUserFeed(fid: number) {
24 return fetchNeynarGet(
25 `feed?feed_type=filter&filter_type=fids&fids=${fid}&with_recasts=false&with_replies=false&limit=100&cursor=`,
27}
28
29export function fetchChannel(channelId: string) {
30 return fetchNeynarGet(`channel?id=${channelId}`).then(r => r.channel);
31}
32
33export function fetchChannelFeed(channelId: string) {
34 return fetchNeynarGet(
35 `feed/channels?channel_ids=${channelId}&with_recasts=false&limit=100`,
37}
38
39export function fetchChannelsFeed(channelIds: array) {
40 return fetchNeynarGet(
41 `feed/channels?channel_ids=${channelIds.join(",")}&with_recasts=false&limit=100`,

CTGBreakerHome.tsx1 match

@horsefacts•Updated 13 hours ago
9import { fetchUsersById } from "../util/neynar.ts";
10
11export function Home() {
12 return (
13 <div class="p-5 mb-8">

getFileEmail4 file matches

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

TwilioHelperFunctions

@vawogbemi•Updated 2 months ago