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=14&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 7186 results for "function"(315ms)

cronmain.tsx1 match

@sophiehouser•Updated 2 days ago
1export default async function(interval: Interval) {
2 fsdfs;
3}

fdfdmain.tsx1 match

@sophiehouser•Updated 2 days ago
1export default async function(interval: Interval) {
2 fs;
3}

resourcefulAzureSturgeonmain.tsx1 match

@sophiehouser•Updated 2 days ago
1export default async function(interval: Interval) {
2 fsfsfssfs;
3}

sfsfsfsmain.tsx1 match

@sophiehouser•Updated 2 days ago
1export default async function(interval: Interval) {
2 fsfsfssfs;
3}

sfsmain.tsx1 match

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

sgsesmain.tsx1 match

@sophiehouser•Updated 2 days ago
1export default async function(interval: Interval) {
2}

notionboxddiary-import.ts2 matches

@jclem•Updated 2 days ago
20const dbID = process.env.NOTION_DATABASE_ID!;
21
22export default async function main() {
23 const [header, ...rows]: string[][] = parse(csv);
24 const items = rows.map(row =>
114}
115
116async function existsByGUID(guid: string) {
117 const res = await notion.databases.query(
118 {

stevensDemotestDailyBrief.ts1 match

@lixP•Updated 2 days ago
4import { DateTime } from "https://esm.sh/luxon@3.4.4";
5
6export async function testDailyBrief() {
7 try {
8 const testChatId = Deno.env.get("TEST_TELEGRAM_CHAT_ID");

stevensDemosetupTelegramChatDb.ts1 match

@lixP•Updated 2 days ago
2// Run this script manually to create the database table
3
4export default async function setupTelegramChatDb() {
5 try {
6 // Import SQLite module

stevensDemosendDailyBrief.ts6 matches

@lixP•Updated 2 days ago
13} from "../memoryUtils.ts";
14
15async function generateBriefingContent(anthropic, memories, today, isSunday) {
16 try {
17 const weekdaysHelp = generateWeekDays(today);
96}
97
98export async function sendDailyBriefing(chatId?: string, today?: DateTime) {
99 // Get API keys from environment
100 const apiKey = Deno.env.get("ANTHROPIC_API_KEY");
135 const lastSunday = today.startOf("week").minus({ days: 1 });
136
137 // Fetch relevant memories using the utility function
138 const memories = await getRelevantMemories();
139
216}
217
218function generateWeekDays(today) {
219 let output = [];
220
239// console.log(weekDays);
240
241// Export a function that calls sendDailyBriefing with no parameters
242// This maintains backward compatibility with existing cron jobs
243export default async function (overrideToday?: DateTime) {
244 return await sendDailyBriefing(undefined, overrideToday);
245}

getFileEmail4 file matches

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

TwilioHelperFunctions

@vawogbemi•Updated 2 months ago