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=1766&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 18726 results for "function"(4754ms)

myApimain.tsx1 match

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

getAllVideosInYoutubePlaylistmain.tsx1 match

@supersayan•Updated 1 year ago
1export async function getAllVideosInYoutubePlaylist(playlistId, apiKey) {
2 const { default: axios } = await import("npm:axios");
3 if (!playlistId) {

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

nftmain.tsx1 match

@vawogbemi•Updated 1 year ago
1export function nft(name, description, image) {
2 return {
3 "name": name,

myApimain.tsx1 match

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

inspoHTMLmain.tsx1 match

@rodrigotello•Updated 1 year ago
1import { valTownInspoList } from "https://esm.town/v/rodrigotello/valTownInspoList";
2
3export function inspoHTML(req, res) {
4 res.send(
5 valTownInspoList.map((d) => `

FigmaFrameObjectToHTMLmain.tsx5 matches

@rodrigotello•Updated 1 year ago
1export function FigmaFrameObjectToHTML(json) {
2 const sansSerifFonts = new Set([
3 "Arial",
24 "serif",
25 ]);
26 function convertRgbToHex(rgb) {
27 return ((rgb * 255) | (1 << 8)).toString(16).slice(1);
28 }
29 function generateColor(cssColorObject) {
30 return `#${
31 Object.values(cssColorObject)
34 }`;
35 }
36 function generateStyles(json) {
37 let style = "";
38 if (json.backgroundColor) {
89 return style;
90 }
91 function convertToHtml(json, level = 0) {
92 if (level > 10) {
93 return ""; // Prevent excessive recursion

convertRGBToHexmain.tsx1 match

@rodrigotello•Updated 1 year ago
1export function convertRGBToHex(rgb) {
2 return ((rgb * 255) | (1 << 8)).toString(16).slice(1);
3}

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": "*",