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=1753&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 18957 results for "function"(1857ms)

pexelsExamplemain.tsx1 match

@stevekrouse•Updated 1 year ago
2import { createClient } from "npm:pexels";
3
4export async function pexelsExample(request: Request): Promise<Response> {
5 const pexels = createClient(Deno.env.get("pexels"));
6 const r = await pexels.photos.search({ query: "singapore skyline" });

emailRandomJokemain.tsx1 match

@amywng•Updated 1 year ago
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

emailRandomJokemain.tsx1 match

@vindema•Updated 1 year ago
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

blobREADME.md1 match

@std•Updated 1 year ago
62### Utilities
63
64Our Blob SDK also includes some utility functions to make working with blobs easier.
65
66##### Copy

untitled_coralChinchillamain.tsx3 matches

@pujdesai•Updated 1 year ago
1export async function untitled_coralChinchilla(email: Email) {
2 async function emailRandomJoke() {
3 async function fetchRandomJoke() {
4 const response = await fetch(
5 "<https://official-joke-api.appspot.com/random_joke>",

emailRandomJokemain.tsx2 matches

@maddytansley•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=11";
2
3export async function emailRandomJoke() {
4 async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

emailRandomJoke2main.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=11";
2
3export async function emailRandomJoke2() {
4 async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",

testingmain.tsx5 matches

@tmcw•Updated 1 year ago
3
4const stream = test.createStream({ objectMode: true });
5stream.on("data", function(row) {
6 console.log(JSON.stringify(row));
7});
8
9test("timing test", function(t) {
10 t.plan(2);
11
12 t.equal(typeof Date.now, "function");
13 var start = Date.now();
14
15 setTimeout(function() {
16 t.equal(Date.now() - start, 100);
17 }, 100);
19
20export const testing = new Promise(resolve => {
21 stream.on("end", function(row) {
22 resolve("ok");
23 });

untitled_plumBedbugmain.tsx2 matches

@derekchiuvamos•Updated 1 year ago
1function emailRandomJoke() {
2 function fetchRandomJoke() {
3 const response = fetch(
4 "<https://official-joke-api.appspot.com/random_joke>",

untitled_azureLeopardmain.tsx3 matches

@julesguarrera•Updated 1 year ago
1export async function untitled_azureLeopard(request: Request): Promise<Response> {
2 return Response.json({ ok: true });
3}
4// Fetches a random joke.
5
6async function emailRandomJoke() {
7 async function fetchRandomJoke() {
8 const response = await fetch(
9 "<https://official-joke-api.appspot.com/random_joke>",

getFileEmail4 file matches

@shouser•Updated 2 weeks 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": "*",