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//%22$%7BSTYLESHEET%7D/%22?q=function&page=1&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 40530 results for "function"(1333ms)

ratelimit4 file matches

@unkey•Updated 1 month ago
Rate limit your serverless functions

discordWebhook2 file matches

@stevekrouse•Updated 2 months ago
Helper function to send Discord messages
tuna

tuna9 file matches

@jxnblk•Updated 3 months ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

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

AutomationFunction1 file match

@saradp•Updated 5 months ago

TwilioHelperFunctions

@vawogbemi•Updated 7 months ago

trmnl_plugins2 file matches

@camflan•Updated 7 months ago
Backend functions for TRMNL plugins

exampleTestFunctions1 file match

@willthereader•Updated 7 months ago

generateFunction1 file match

@wolf•Updated 8 months ago

functionExercise2 file matches

@willthereader•Updated 9 months ago

brew_countermain.ts1 match

@lazysous•Updated 1 hour ago
21`);
22
23export default async function (req: Request): Promise<Response> {
24 const url = new URL(req.url);
25

untitled-8264Main2.ts12 matches

@ziggyware•Updated 1 hour ago
1export default async function (req: Request): Promise<Response> {
2 const fftSize = 2048;
3 const TWO_PI = 2.0 * 3.141592653579;
74
75
76 function showError(e) {
77 console.error(e);
78 errorBox.style.display = "block";
81
82 // DPR-aware resize
83 function resize() {
84 const dpr = Math.min(window.devicePixelRatio || 1, 2);
85 const w = Math.floor(window.innerWidth * dpr);
196 \`;
197
198 function compileShader(type, src) {
199 const s = gl.createShader(type);
200 gl.shaderSource(s, src);
222 gl.bindVertexArray(vao);
223
224 function createAttrib(data, attribName, usage) {
225 const loc = gl.getAttribLocation(program, attribName);
226 if (loc === -1) throw new Error("Attrib not found or optimized out: " + attribName);
248
249 // Matrices
250 function mat4Perspective(fovDeg, aspect, near, far) {
251 const f = 1.0 / Math.tan((fovDeg * Math.PI) / 360);
252 const nf = 1 / (near - far);
259 return out;
260 }
261 function subtract(a, b) { return [a[0]-b[0], a[1]-b[1], a[2]-b[2]]; }
262 function normalize(v) {
263 const l = Math.hypot(v[0], v[1], v[2]) || 1;
264 return [v[0]/l, v[1]/l, v[2]/l];
265 }
266 function cross(a, b) {
267 return [a[1]*b[2] - a[2]*b[1], a[2]*b[0] - a[0]*b[2], a[0]*b[1] - a[1]*b[0]];
268 }
269 function dot(a, b) { return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]; }
270 function mat4LookAt(eye, target, up) {
271 const z = normalize(subtract(eye, target));
272 const x = normalize(cross(up, z));
314
315 // Render loop
316 function render(ts) {
317 // Update audio only if ready
318 if (analyser) {
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.