mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-13 16:17:54 +00:00
12 lines
334 B
JavaScript
12 lines
334 B
JavaScript
let hb;
|
|
export const renderTemplate=async(t,d)=>{
|
|
try{
|
|
hb??=(await import('https://cdn.jsdelivr.net/npm/handlebars@4.7.8/dist/handlebars.mjs')).default;
|
|
return hb.compile(t)(d);
|
|
}catch(e){
|
|
throw new Error(`Render failed: ${e.message}`);
|
|
}
|
|
};
|
|
export default renderTemplate;
|
|
// Generation time: 50.722s
|
|
// Result: FAIL
|