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/$%7Burl%7D?q=function&page=2404&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 24761 results for "function"(5084ms)

sampleFirehosemain.tsx3 matches

@lukas•Updated 1 year ago
1export async function sampleFirehose() {
2 const cborx = await import("https://deno.land/x/cbor@v1.5.2/index.js");
3 const multiformats = await import("npm:multiformats");
143 return decoded;
144 };
145 async function* byFrame(ws: WebSocketStream) {
146 const { readable } = await ws.connection;
147 const reader = readable.getReader();
156 }
157 }
158 async function* byMessage(ws: WebSocketStream) {
159 for await (const frame of byFrame(ws)) {
160 if (frame.isMessage()) {

myApimain.tsx1 match

@impedivity•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

myApimain.tsx1 match

@abeyang•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

YoutubeSummarymain.tsx1 match

@zzz•Updated 1 year ago
4// https://api.val.town/v1/express/zzz.rime?text=Hello%20Val%20Town
5// videoId: either videoId or full youtube url (e.g. https://www.youtube.com/watch?v=p2glje8z_tw)
6export async function YoutubeSummary(req, res) {
7 const { videoId = "p2glje8z_tw" } = req.query;
8 const text = await YoutubeTranscript(videoId, false) as string;

fetchTweetmain.tsx1 match

@dpetrouk•Updated 1 year ago
2import { normalizeURL } from "https://esm.town/v/stevekrouse/normalizeURL?v=3";
3
4export async function fetchTweet(url) {
5 const tweetId = url.match(/(\d{19})/)[1];
6 const tweetUrl =

cronTestmain.tsx1 match

@lirenxn•Updated 1 year ago
1export function cronTest() {
2 console.log("hello world");
3 return "hello world";

pingMemain.tsx1 match

@prepor•Updated 1 year ago
1let { incrementer } = await import("https://esm.town/v/prepor/incrementer");
2
3export function pingMe() {
4 incrementer += 1;
5 console.email(`How are you? ${incrementer}`);

spellCheckTestmain.tsx3 matches

@steveb1313•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function spellCheckTest(
4 req: express.Request,
5 res: express.Response,
29 <h3>School: ${spell["school"]["name"]}</h3>
30 <h3>Description: ${spell["desc"][0]}</h3>
31 <button onclick="myFunction()">Reveal Spell</button><br>
32 <div id="myDIV"></div>
33 <button type="button" onClick="window.location.reload();">Check a new Spell</button>
34 </div>
35 <script>
36 function myFunction() {
37 var x = document.getElementById("myDIV");
38 if (x.innerHTML === "") {

myApimain.tsx1 match

@spoon•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

myApimain.tsx1 match

@lol•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
tuna

tuna8 file matches

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