refactor: batch 3

This commit is contained in:
鲁树人 committed 2025-05-18 02:41:20 +09:00
1 parent 75b43e1e84
commit 2e4e57be45
52 files changed
+933 -1136

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
export function applyTemplate(tpl: string, values: Record<string, unknown>) {
return tpl.replace(/\{\{\s*(\w+)\s*\}\}/g, (_, key) => (Object.hasOwn(values, key) ? String(values[key]) : ''));
}