mirror of
https://git.um-react.app/um/um-react.git
synced 2026-11-27 23:56:59 +00:00
refactor: major package updates
This commit is contained in:
1 parent
2e52c67533
commit
a11caaae92
34 files changed
+373
-240
No files matched your search
@@ -1,3 +1,5 @@
|
||||
export function applyTemplate(tpl: string, values: Record<string, unknown>) {
|
||||
return tpl.replace(/\{\{\s*(\w+)\s*\}\}/g, (_, key) => (Object.hasOwn(values, key) ? String(values[key]) : ''));
|
||||
return tpl.replace(/\{\{\s*(\w+)\s*\}\}/g, (_, key: string) =>
|
||||
Object.hasOwn(values, key) ? String(values[key]) : '',
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user