mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 00:27:55 +00:00
7 lines
260 B
JavaScript
7 lines
260 B
JavaScript
let h, c = new Map();
|
|
const renderTemplate = async (t, d) => {
|
|
h ||= (await import('https://cdn.jsdelivr.net/npm/handlebars@4.7.8/dist/handlebars.min.js')).default;
|
|
c.has(t) || c.set(t, h.compile(t));
|
|
return c.get(t)(d);
|
|
};
|
|
export default renderTemplate; |