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/image-url.jpg%20%22Optional%20title%22?q=function&page=64&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 19786 results for "function"(1992ms)

ValTown-Package-Trackerindex.ts1 match

@jhiller•Updated 2 days ago
15};
16
17function isInNorthAmerica(lat: number, lng: number): boolean {
18 return (
19 lat >= NA_BOUNDS.latMin &&

ipv4-counterdatabase.ts4 matches

@maxm•Updated 2 days ago
16 * Initialize the database with our table
17 */
18export async function initDatabase() {
19 await sqlite.execute(`
20 CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
33 * If not, create a new record
34 */
35export async function recordVisit(ip: string): Promise<void> {
36 const now = new Date().toISOString();
37 await sqlite.execute(
48 * Get all visit records
49 */
50export async function getAllVisits(): Promise<VisitRecord[]> {
51 const result = await sqlite.execute(
52 `SELECT * FROM ${TABLE_NAME} ORDER BY visits DESC`,
59 * Get total visit count across all IPs
60 */
61export async function getTotalVisits(): Promise<number> {
62 const result = await sqlite.execute(
63 `SELECT SUM(visits) as total FROM ${TABLE_NAME}`,

subdomainsreels.tsx1 match

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

subdomainslnk.tsx1 match

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

subdomainslink.tsx1 match

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

subdomainsurl.tsx1 match

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

subdomainsroute.tsx1 match

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

subdomainsimgs.tsx1 match

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

subdomainsasset.tsx1 match

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

subdomainsrooms.tsx1 match

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

getFileEmail4 file matches

@shouser•Updated 3 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
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.