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 30402 results for "function"(2162ms)

voicemessagesqueries.ts6 matches

@arthrod•Updated 5 hours ago
3import type { VoiceNote } from "../../shared/types.ts";
4
5export async function createVoiceNote(voiceNote: Omit<VoiceNote, 'isExpired'>): Promise<void> {
6 try {
7 await sqlite.execute(
29}
30
31export async function getVoiceNote(id: string): Promise<VoiceNote | null> {
32 try {
33 const result = await sqlite.execute(
68}
69
70export async function incrementListenCount(id: string): Promise<void> {
71 await sqlite.execute(
72 `UPDATE ${TABLE_NAME} SET current_listens = current_listens + 1 WHERE id = ?`,
75}
76
77export async function updateTranscription(id: string, transcription: string): Promise<void> {
78 await sqlite.execute(
79 `UPDATE ${TABLE_NAME} SET transcription = ? WHERE id = ?`,
82}
83
84export async function deleteVoiceNote(id: string): Promise<void> {
85 await sqlite.execute(
86 `DELETE FROM ${TABLE_NAME} WHERE id = ?`,
89}
90
91export async function getAllVoiceNotes(): Promise<VoiceNote[]> {
92 try {
93 const result = await sqlite.execute(`SELECT * FROM ${TABLE_NAME} ORDER BY created_at DESC`);

voicemessagesmigrations.ts1 match

@arthrod•Updated 5 hours ago
3const TABLE_NAME = 'voice_notes_v1';
4
5export async function runMigrations() {
6 try {
7 // Create voice notes table

voicemessagesDashboard.tsx1 match

@arthrod•Updated 5 hours ago
3import type { VoiceNote } from "../../shared/types.ts";
4
5export default function Dashboard() {
6 const [voiceNotes, setVoiceNotes] = useState<VoiceNote[]>([]);
7 const [loading, setLoading] = useState(true);

voicemessagesApp.tsx1 match

@arthrod•Updated 5 hours ago
11}
12
13export default function App() {
14 const [currentView, setCurrentView] = useState<"recorder" | "player" | "dashboard">("recorder");
15 const voiceNoteId = window.__VOICE_NOTE_ID__;

spider-solREADME.md2 matches

@feb•Updated 7 hours ago
10- Responsive design for desktop and mobile
11- Score tracking and move counter
12- Timer functionality
13- Undo functionality
14- Hint system with visual feedback
15- Auto-complete sequence detection

mcp-starterREADME.md1 match

@mattrossman•Updated 8 hours ago
31
32The MCP TypeScript SDK uses Node-specific APIs that don't play nicely with Deno
33or edge functions:
34
35- https://github.com/modelcontextprotocol/typescript-sdk/issues/260

web_ZcT6IkFP7qmain.tsx1 match

@dhvanil•Updated 8 hours ago
1
2export default async function(req) {
3 return new Response(`undefined`, {
4 headers: { 'Content-Type': 'text/html' }

web_IVDkuw1wQ8main.tsx1 match

@dhvanil•Updated 9 hours ago
1
2export default async function(req) {
3 return new Response(`undefined`, {
4 headers: { 'Content-Type': 'text/html' }

web_jbKPo47Qxlmain.tsx1 match

@dhvanil•Updated 9 hours ago
1
2export default async function(req) {
3 return new Response(`undefined`, {
4 headers: { 'Content-Type': 'text/html' }

web_ztTmrSwApDmain.tsx1 match

@dhvanil•Updated 9 hours ago
1
2export default async function(req) {
3 return new Response(`undefined`, {
4 headers: { 'Content-Type': 'text/html' }
tuna

tuna9 file matches

@jxnblk•Updated 1 week 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.