mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 08:37:56 +00:00
9 lines
297 B
JavaScript
9 lines
297 B
JavaScript
async function renderTemplate(templateString, data) {
|
|
const { default: Handlebars } = await import(
|
|
'https://cdn.jsdelivr.net/npm/handlebars@4.7.8/dist/handlebars.min.js'
|
|
);
|
|
|
|
const template = Handlebars.compile(templateString);
|
|
return template(data);
|
|
}
|
|
export default renderTemplate; |