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=39&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 31478 results for "function"(6381ms)

Glancerdatabase.controller.ts1 match

@glance•Updated 2 days ago
6});
7
8export async function getDatabase(databaseId: string) {
9 // get database
10 try {

Glancercobrowse.controller.ts1 match

@glance•Updated 2 days ago
6});
7
8export async function setCobrowse(pageId: string, cobrowse: boolean) {
9 try {
10 const page = await notion.pages.update({

GlancerblobKeyForHealthCheck.ts1 match

@glance•Updated 2 days ago
1export async function blobKeyForHealthCheck() {
2 // get the url of this file
3 // we'll use this to get values for the blob key

GlancerblobKeyForDemoCobrowseStatus.ts1 match

@glance•Updated 2 days ago
1export async function blobKeyForDemoCobrowseStatus(id: string) {
2 // get the url of this file
3 // we'll use this to get values for the blob key

Glanceragent.controller.ts1 match

@glance•Updated 2 days ago
6});
7
8export async function enrichAgent(pageId: string, data: any) {
9 // console.log(data);
10 const properties =

Glanceractions.controller.ts3 matches

@glance•Updated 2 days ago
6});
7
8export async function getDemoInteractions(pageId: string) {
9 const databaseId = Deno.env.get("GLANCE_INTERACTIONS_DB_ID");
10
39}
40
41export async function getAllInteractionsPages() {
42 const databaseId = Deno.env.get("GLANCE_INTERACTIONS_DB_ID");
43
69}
70
71export async function getAllInteractionsPagesWithPagination() {
72 const databaseId = Deno.env.get("GLANCE_INTERACTIONS_DB_ID");
73

Glanceraction.controller.ts1 match

@glance•Updated 2 days ago
6});
7
8export async function setAction(data: any) {
9 try {
10 const page = await notion.pages.create({

GlancerApp.tsx3 matches

@lightweight•Updated 2 days ago
14}
15// Simple hook for mobile menu toggle
16function useMobileMenu() {
17 const [isOpen, setIsOpen] = useState(false);
18 const toggleMenu = () => setIsOpen(!isOpen);
22
23// Simple hook for tracking current hash for active nav styling
24function useCurrentHash() {
25 const [currentHash, setCurrentHash] = useState(() => window.location.hash.slice(1));
26
37}
38
39export function App({ initialData }: AppProps) {
40 // initialData
41 const { demoData, loading, error } = initialData;

GlancerpollEnabledStatus.ts1 match

@lightweight•Updated 2 days 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;

openai_enrichmentindex.ts5 matches

@stevekrouse•Updated 2 days ago
26}
27
28export default async function (req: Request): Promise<Response> {
29 // Only allow POST requests with form data
30 if (req.method !== "POST") {
161}
162
163// Helper function to extract sections from the response
164function extractSection(content: string, sectionName: string): string {
165 const regex = new RegExp(
166 `${sectionName}:?\\s*([\\s\\S]*?)(?=\\n\\d+\\.|\\n[A-Z_]+:|$)`,
171}
172
173// Helper function to extract sources
174function extractSources(content: string): string[] {
175 const sourcesSection = extractSection(content, "SOURCES");
176 if (sourcesSection === "No information found") {
tuna

tuna9 file matches

@jxnblk•Updated 2 weeks ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
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.