vblog
Viewing readonly version: 217View latest version
Script
9
1
2
3
4
5
6
7
8
import type { Plugin, Post } from "./types";
export async function parse(post: Post, plugins: Plugin[]) {
return await plugins.reduce(async (acc: Promise<Post>, plugin: Plugin) => {
const post = await acc;
return await plugin(post);
}, Promise.resolve(post));
}
H
www