1export async function ghIssueFromNodeId(nodeId: string, token: string): Promise<{
2 id: string;
3 number: number;
2import { youtubeFeed } from "https://esm.town/v/pdebie/youtubeFeed";
3
4export async function publishYoutubeToLemmy(
5 { instance, communityId, auth, youtubeChannelId, syncInfo, filter }: {
6 instance: string;
14 const { LemmyHttp } = await import("npm:lemmy-js-client@0.18.1");
15 let client = new LemmyHttp(`https://${instance}`, {
16 fetchFunction: fetch,
17 });
18 const items =
1import { fetchRss } from "https://esm.town/v/pdebie/fetchRss";
2
3export function youtubeFeed(channelId: string, lastCheckDate?: string | number) {
4 return fetchRss(
5 "https://www.youtube.com/feeds/videos.xml?channel_id=" + channelId,
1export function FigmaFramesOnly(json: any): any {
2 const frames = [];
3 const canvases = json.document.children.filter((child) =>
1export function myApi(name) {
2 return "hi " + name;
3}
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function hnTopStory() {
4 const topStories: Number[] = await fetch(
5 "https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty"
1export function myApi(name) {
2 return "hi " + name;
3}
1import { myTestForm } from "https://esm.town/v/octref/myTestForm";
2
3export function handleForm(params) {
4 myTestForm.push(params);
5 return `Thanks for your submission ${params.name}`;
1// load 'src' from CDN if it isn't already
2// callback is a string that defines a function you'd like to run after your script loads
3export function addScript(src: string, callback?: Function): string {
4 return `
5 <script type="text/javascript">
3import { addReactFromCDN } from "https://esm.town/v/liamdanielduffy/addReactFromCDN";
4
5export function myReactApp() {
6 const loadReact = addReactFromCDN();
7 const myReactComponent = myReactComponent2();
A helper function to build a file's email
Simple functional CSS library for Val Town
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
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": "*",