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=2128&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 30600 results for "function"(11510ms)

tuna

tunacreate-rule.tsx1 match

@jxnblk•Updated 3 months ago
7const MEDIA_RE = /^@media/;
8
9export default function createRule(obj, parentKey) {
10 const rules = [];
11 const classNames = [];
tuna

tunacreate-raw-rule.tsx1 match

@jxnblk•Updated 3 months ago
1import createDeclaration from "./create-declaration.tsx";
2
3export default function createRawRule(selector, obj) {
4 const decs = [];
5 for (const [key, val] of Object.entries(obj)) {
tuna

tunacreate-media-rule.tsx1 match

@jxnblk•Updated 3 months ago
5const NESTED_RE = /&/;
6
7export default function createMediaRule(media, obj) {
8 const _rules = [];
9 const _classNames = [];
tuna

tunacreate-nested-rule.tsx1 match

@jxnblk•Updated 3 months ago
4// e.g. box { "&:hover": { color: "red" } }
5// "&:hover", { color: "red" }
6export default function createNestedRule(selector, obj) {
7 const _rules = [];
8 const _classNames = [];

twitterMainREADME.md2 matches

@charmaine•Updated 3 months ago
46- Key: `mentionsDiscord`
47- Value: Your Discord webhook URL.
48Notifications will be sent using this function:
49
50```ts
63
64- **Proxies via Val Town's [SocialDataProxy](https://www.val.town/v/stevekrouse/socialDataProxy)**: Limited to 10 cents per day for [**Val Town Pro users**](https://www.val.town/pricing). This API is *only* for Pro users.
65- **Need more calls?** Sign up for your own [SocialData API token](https://socialdata.tools) and configure the [`socialDataSearch`](https://www.val.town/v/stevekrouse/socialDataSearch) function.

twitterMainmain.tsx1 match

@charmaine•Updated 3 months ago
12const isProd = false;
13
14export async function twitterAlert({ lastRunAt }: Interval) {
15 // If isProd, search for tweets since that last time this interval ran
16 // if not, search for tweets since 48 hours ago for testing

hello_worldfileDeleted.ts1 match

@shouser•Updated 3 months ago
1export default async function(req: Request): Promise<Response> {
2 try {
3 if (req.method !== "POST") {

hello_worldfileCreated.ts1 match

@shouser•Updated 3 months ago
1export default async function(req: Request): Promise<Response> {
2 try {
3 if (req.method !== "POST") {

static_reactdemo.http.tsx1 match

@jxnblk•Updated 3 months ago
4import reactRender from "./react-render.tsx";
5
6function Demo () {
7 return (
8 <html>

static_reactindex.tsx2 matches

@jxnblk•Updated 3 months ago
3export type Middleware = (req: DataRequest, res: Response, callback: NextCallback) => Promise<Response>;
4
5export function render<T>(...args: Middleware[]) {
6 const middleware: Middleware[] = args.slice().filter(Boolean);
7
8 return async function handler(request: Request): Promise<Response> {
9
10 let res: Response = new Response();
tuna

tuna9 file matches

@jxnblk•Updated 1 week 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.