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/$%7Bsuccess?q=function&page=1693&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 19904 results for "function"(2397ms)

sqliteExplorerAppREADME.md1 match

@vawogbemi•Updated 11 months ago
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query

dailyStandupBotmain.tsx1 match

@kevinw•Updated 11 months ago
1import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook";
2
3export default async function() {
4 discordWebhook({
5 url: Deno.env.get("engDiscord"),

readwiseHighlightsmain.tsx1 match

@zerovox•Updated 11 months ago
1export async function readwiseHighlights(token: string, ids?: number[]) {
2 let fullData = [];
3 let nextPageCursor = null;

readwiseReaderDocumentListmain.tsx1 match

@zerovox•Updated 11 months ago
24}
25
26export async function readwiseReaderDocumentList(
27 token: string,
28 updatedAfter: string | undefined,

readwiseReaderReadItemsRssmain.tsx3 matches

@zerovox•Updated 11 months ago
2import { readwiseReaderDocumentList } from "https://esm.town/v/zerovox/readwiseReaderDocumentList";
3
4export async function readwiseReaderReadItemsRss() {
5 // Get all of a user's archived documents
6 const archivedData = await readwiseReaderDocumentList(Deno.env.get("readwiseReaderApiToken"), undefined, "archive");
25}
26
27function escapeXml(unsafe) {
28 return unsafe.replace(/[<>&'"]/g, function(c) {
29 switch (c) {
30 case "<":

valTownChatGPTmain.tsx3 matches

@simonw•Updated 11 months ago
13
14const clientCode = () => {
15 document.getElementById("input").addEventListener("submit", async function(event) {
16 event.preventDefault();
17
45 + `&assistantId=${input.getAttribute("data-assistant-id")}`,
46 );
47 eventSource.onmessage = function(event) {
48 console.log(event);
49 responseDiv.innerText += JSON.parse(event.data);
50 };
51
52 eventSource.onerror = function() {
53 eventSource.close();
54 };

heat_at_pointmain.tsx1 match

@l3gacyb3ta•Updated 11 months ago
3const lerp = (a, b, t) => (1 - t) * a + t * b;
4
5function transform(a, b, M, roundToInt = false) {
6 const round = (v) => (roundToInt ? v | 0 : v);
7 return [

exampleTranslationmain.tsx2 matches

@iamseeley•Updated 11 months ago
1import Pipeline from "https://esm.town/v/iamseeley/pipeline";
2
3export default async function handler(req) {
4 if (req.method === "GET") {
5 return new Response(`
16
17 <script>
18 document.getElementById('translationForm').addEventListener('submit', async function(event) {
19 event.preventDefault();
20 const formData = new FormData(this);

exampleFeatureExtractionmain.tsx1 match

@iamseeley•Updated 11 months ago
1import Pipeline from "https://esm.town/v/iamseeley/pipeline";
2
3export default async function handler(req) {
4 if (req.method === "GET") {
5 return new Response(`

exampleQuestionAnsweringmain.tsx1 match

@iamseeley•Updated 11 months ago
1import Pipeline from "https://esm.town/v/iamseeley/pipeline";
2
3export async function questionAnsweringHandler(req) {
4 if (req.method === "GET") {
5 return new Response(`

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 3 weeks 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.