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/$2?q=function&page=22&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 28772 results for "function"(799ms)

markdown-embedpollEnabledStatus.ts1 match

@stevekrouse•Updated 1 day ago
1export async function pollEnabledStatus() {
2 // this shouldn't run forever just b/c someone forgot to close their browser tab with the demo in it
3 const interval = 1000; // 10000;

markdown-embedpdf.tsx1 match

@stevekrouse•Updated 1 day ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3export function PdfContent({ data, content }) {
4 // const { content, contentURL, docsURL } = config;
5 // console.log("content: ", content);

markdown-embedindex.tsx4 matches

@stevekrouse•Updated 1 day ago
21
22// Type guards
23export function isApiError(data: DemoData): data is ApiErrorResponse {
24 return 'message' in data && 'status' in data;
25}
26
27export function isNotionPage(data: DemoData): data is NotionPage {
28 return 'object' in data && data.object === 'page';
29}
44
45// Prepare initial data
46async function prepareInitialData(): Promise<{
47 demoData: DemoData | null;
48 loading: boolean;
91
92// Initialize the app
93async function initializeApp() {
94 const root = document.getElementById("root");
95 if (!root) {

markdown-embediframe.tsx1 match

@stevekrouse•Updated 1 day ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3export function IframeContent({ data, content }) {
4 // const { content, contentURL, docsURL } = config;
5 // console.log("content: ", content);

markdown-embedhealthCheck.ts2 matches

@stevekrouse•Updated 1 day ago
8});
9
10function buildData(response) {
11 return {
12 status: "connected",
23// we present that at root and embed that into Notion
24// to show everyone that the connection is healthy btw Notion and val.town
25export default async function (interval: Interval) {
26 const blobKey = await blobKeyForDemoCache(import.meta.url, "healthCheck");
27 try {

markdown-embedgettingStarted.tsx1 match

@stevekrouse•Updated 1 day ago
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3export function GettingStartedContent({ data, title }) {
4 // const { content, contentURL, docsURL } = config;
5 // console.log("data: ", data);
6});
7
8export async function getRelatedPagesFromDatabase(
9 pageId: string // the /demo page
10) {

markdown-embedgetPage.ts1 match

@stevekrouse•Updated 1 day ago
6});
7
8export async function getPage(id: string) {
9 // get page
10 try {

markdown-embedgetDatabase.ts1 match

@stevekrouse•Updated 1 day ago
6});
7
8export async function getDatabase(id: string) {
9 // get database
10 try {

markdown-embedgetActions.ts2 matches

@stevekrouse•Updated 1 day ago
6});
7
8export async function getAllInteractionsPages() {
9 const databaseId = Deno.env.get("GLANCE_INTERACTIONS_DB_ID");
10
36}
37
38export async function getAllInteractionsPagesWithPagination() {
39 const databaseId = Deno.env.get("GLANCE_INTERACTIONS_DB_ID");
40

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.