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=697&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"(743ms)

statusmonitor1 match

@rileytg•Updated 2 months ago
7);
8
9export async function uptimeCheck(url: string) {
10 let reason: string, status: number, end: number;
11 let ok = true;

statusstatus3 matches

@epelz•Updated 2 months ago
9const thisURL = parseProject(import.meta.url).links.self.project;
10
11function StatusRow({ rows }) {
12 return (
13 <div className="w-full flex flex-col space-y-2">
31}
32
33function StatusSection({ url, rows }) {
34 const sectionRows = rows.filter(row => row[0] === url);
35 const percentUp = Math.round((sectionRows.filter(row => row[1]).length / sectionRows.length) * 100);
47}
48
49export default async function(req: Request): Promise<Response> {
50 const { rows } = await sqlite.execute(
51 "select url, ok, duration, timestamp from uptime order by timestamp desc limit 200",

statussparklineSVG1 match

@epelz•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function SparklineSVG({ strokeWidth = 2, data = [], fill = "none", stroke = "black" }) {
3 const padding = 2;
4 const xMargin = 25;

statusnotify1 match

@epelz•Updated 2 months ago
4const thisURL = parseProject(import.meta.url).links.self.latest;
5
6export async function notify(message: string) {
7 await email({ subject: message, text: `Email sent from ${thisURL}` });
8}

statusmonitor1 match

@epelz•Updated 2 months ago
7);
8
9export async function uptimeCheck(url: string) {
10 let reason: string, status: number, end: number;
11 let ok = true;

tsEvaltsEval1 match

@maxm•Updated 2 months ago
3import { newWorker } from "./worker";
4
5function encodeSSE(data: any) {
6 return new TextEncoder().encode(`data: ${JSON.stringify(data)}\r\n\r\n`);
7}

statusstatus3 matches

@wilg•Updated 2 months ago
9const thisURL = parseProject(import.meta.url).links.self.project;
10
11function StatusRow({ rows }) {
12 return (
13 <div className="w-full flex flex-col space-y-2">
31}
32
33function StatusSection({ url, rows }) {
34 const sectionRows = rows.filter(row => row[0] === url);
35 const percentUp = Math.round((sectionRows.filter(row => row[1]).length / sectionRows.length) * 100);
47}
48
49export default async function(req: Request): Promise<Response> {
50 const { rows } = await sqlite.execute(
51 "select url, ok, duration, timestamp from uptime order by timestamp desc limit 200",

statussparklineSVG1 match

@wilg•Updated 2 months ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function SparklineSVG({ strokeWidth = 2, data = [], fill = "none", stroke = "black" }) {
3 const padding = 2;
4 const xMargin = 25;

statusmonitor1 match

@wilg•Updated 2 months ago
7);
8
9export async function uptimeCheck(url: string) {
10 let reason: string, status: number, end: number;
11 let ok = true;

esbuildProxyhttp1 match

@maxm•Updated 2 months ago
1export default async function(req: Request): Promise<Response> {
2 return new Response(
3 `

getFileEmail4 file matches

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

TwilioHelperFunctions

@vawogbemi•Updated 2 months ago