7const MEDIA_RE = /^@media/;
8
9export default function createRule(obj, parentKey) {
10 const rules = [];
11 const classNames = [];
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)) {
5const NESTED_RE = /&/;
6
7export default function createMediaRule(media, obj) {
8 const _rules = [];
9 const _classNames = [];
4// e.g. box { "&:hover": { color: "red" } }
5// "&:hover", { color: "red" }
6export default function createNestedRule(selector, obj) {
7 const _rules = [];
8 const _classNames = [];
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.
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
1export default async function(req: Request): Promise<Response> {
2 try {
3 if (req.method !== "POST") {
1export default async function(req: Request): Promise<Response> {
2 try {
3 if (req.method !== "POST") {
4import reactRender from "./react-render.tsx";
5
6function Demo () {
7 return (
8 <html>
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();
Simple functional CSS library for Val Town
A helper function to build a file's email
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": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.