mirror of
https://git.um-react.app/um/um-react.git
synced 2026-11-27 23:56:59 +00:00
refactor: batch 3
This commit is contained in:
1 parent
75b43e1e84
commit
2e4e57be45
52 files changed
+933
-1136
No files matched your search
@@ -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]) : ''));
|
||||
}
|
||||
Reference in new issue
Block a user