Small wget like mirroring utility.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Simplify decorator registry to export struct directly

rektide 4a44c207 f756e0a7

+1 -9
+1 -9
src/decorate/registry.ts
··· 1 1 import { HTMLRewriter } from "html-rewriter-wasm"; 2 2 import { Decorator, DecoratorResult } from "./types.ts"; 3 3 4 - const decorators = new Map<string, Decorator>(); 5 - 6 - export function registerDecorator(decorator: Decorator): void { 7 - decorators.set(decorator.name, decorator); 8 - } 9 - 10 - export function getDecorator(name: string): Decorator | undefined { 11 - return decorators.get(name); 12 - } 4 + export const decorators = new Map<string, Decorator>(); 13 5 14 6 export async function decorateHtml(html: string): Promise<DecoratorResult> { 15 7 const result: DecoratorResult = {};