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=1740&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 18127 results for "function"(1608ms)

scrapeWebsitemain.tsx1 match

@oca99•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function scrapeWebsite(url) {
4 const { DOMParser } = await import(
5 "https://deno.land/x/deno_dom@v0.1.38/deno-dom-wasm.ts"

pocketmain.tsx1 match

@andreterron•Updated 1 year ago
1export function pocket() {
2 return {
3 hello: () => { return 'hi there' }

notionWordCounterFetchDaysmain.tsx1 match

@andreterron•Updated 1 year ago
3import { notionWordCounterDaysLastCached } from "https://esm.town/v/andreterron/notionWordCounterDaysLastCached";
4
5export async function notionWordCounterFetchDays() {
6 if (
7 notionWordCounterDaysLastCached >

myApimain.tsx1 match

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

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";

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 2 weeks ago
Simple functional CSS library for Val Town
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
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": "*",