11}
12
13export function updateValByID({ token, valId, code, name, readme, privacy }: UpdateValArgs): Promise<any> {
14 const body: Record<string, unknown> = {
15 token,
7}
8
9export function updateValByName({ token, code, name }: UpdateValArgs): Promise<any> {
10 const body: Record<string, unknown> = {
11 token,
1export default async function (req: Request): Promise<Response> {
2 return Response.json({
3 type: 'Feature',
4import mime from "npm:mime@4.0.1";
5
6export function extractFiles(markdown: string): Record<string, string> {
7 const fileRegex = /^```(\w+)\s*(.*)\s*\n([\s\S]*?)```/gm;
8 const files: Record<string, string> = {};
18}
19
20export default async function(req: Request) {
21 const { pathname, search } = new URL(req.url);
22 const params = new URLSearchParams(search);
3 const allowedLogLevels = ["error", "debug", "info", "warn"];
4
5 function logMessage(level, message) {
6 // console.log("logMessage function called");
7 // Check if the specified log level is allowed
8 if (allowedLogLevels.includes(level)) {
16 }
17
18 return logMessage; // Return the logMessage function for usage
19})();
20
21// Export the logMessage function for use in other modules
22export { logMessage };
23
1import { logMessage } from "https://esm.town/v/willthereader/logMessage";
2
3// Immediately invoked function that exports a function generating a URL as a string,
4// which fetches all comments from an article associated with the provided post_id.
5export const constructReadTangleUrl = (() => {
17];
18
19function renderCell(header, row) {
20 let data = row[header];
21 if (header === "Name") {
31}
32
33export async function docs_table() {
34 const docs = await getDocs();
35 return (
6const styleEl = document.getElementById("style");
7
8DataTable.ext.search.push(function(settings, data, dataIndex) {
9 let min = parseInt(minEl.value, 10);
10 let max = parseInt(maxEl.value, 10);
11});
12
13async function getKnownThreads() {
14 const result = await db.select().from(threadsTbl);
15 return result.reduce((r, { id, last_message_id }) => {
19}
20
21async function getNewThreads() {
22 const resp = await fetch(`https://discord.com/api/guilds/${guild}/threads/active`, {
23 headers: {
34}
35
36export async function getThreadsActivity(
37 token: string,
38 guild: string,
4const desiredGenderEl = document.getElementById("desired-gender");
5
6DataTable.ext.search.push(function(settings, data, dataIndex) {
7 let min = parseInt(minEl.value, 10);
8 let max = parseInt(maxEl.value, 10);