mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-16 19:01:02 +00:00
Delete tests/4_transpiler/outputs directory
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
async function renderTemplate(template, data) {
|
||||
const { default: Handlebars } = await import('https://esm.sh/handlebars');
|
||||
return Handlebars.compile(template)(data);
|
||||
}
|
||||
export default renderTemplate;
|
||||
// Generation time: 2.930s
|
||||
// Result: PASS
|
||||
@@ -1,7 +0,0 @@
|
||||
async function renderTemplate(template, data) {
|
||||
const { default: Handlebars } = await import("https://esm.sh/handlebars");
|
||||
return Handlebars.compile(template)(data);
|
||||
}
|
||||
export default renderTemplate;
|
||||
// Generation time: 2.186s
|
||||
// Result: PASS
|
||||
@@ -1,7 +0,0 @@
|
||||
async function renderTemplate(template, data) {
|
||||
const { default: Handlebars } = await import('https://cdn.jsdelivr.net/npm/handlebars@4.7.8/dist/handlebars.min.js');
|
||||
return Handlebars.compile(template)(data);
|
||||
}
|
||||
export default renderTemplate;
|
||||
// Generation time: 2.224s
|
||||
// Result: FAIL
|
||||
@@ -1,9 +0,0 @@
|
||||
const renderTemplate = async (template, data) => {
|
||||
const { default: Handlebars } = await import(
|
||||
"https://cdn.jsdelivr.net/npm/handlebars@latest/dist/handlebars.esm.min.js"
|
||||
);
|
||||
return Handlebars.compile(template)(data);
|
||||
};
|
||||
export default renderTemplate;
|
||||
// Generation time: 1.675s
|
||||
// Result: FAIL
|
||||
@@ -1,8 +0,0 @@
|
||||
const renderTemplate = async (templateString, data) => {
|
||||
const { default: Handlebars } = await import('https://cdn.skypack.dev/handlebars');
|
||||
const template = Handlebars.compile(templateString);
|
||||
return template(data);
|
||||
};
|
||||
export default renderTemplate;
|
||||
// Generation time: 3.202s
|
||||
// Result: PASS
|
||||
@@ -1,7 +0,0 @@
|
||||
const renderTemplate = async (template, data) => {
|
||||
const { default: h } = await import('https://esm.sh/handlebars@4.7.8');
|
||||
return h.compile(template)(data);
|
||||
};
|
||||
export default renderTemplate;
|
||||
// Generation time: 18.775s
|
||||
// Result: PASS
|
||||
@@ -1,6 +0,0 @@
|
||||
const renderTemplate = async (t, d) =>
|
||||
(await import('https://esm.sh/handlebars'))
|
||||
.default.compile(t)(d)
|
||||
export default renderTemplate;
|
||||
// Generation time: 29.656s
|
||||
// Result: PASS
|
||||
@@ -1,7 +0,0 @@
|
||||
async function renderTemplate(tmpl, data) {
|
||||
const { compile } = await import('https://cdn.skypack.dev/handlebars');
|
||||
return compile(tmpl)(data);
|
||||
}
|
||||
export default renderTemplate;
|
||||
// Generation time: 1.302s
|
||||
// Result: PASS
|
||||
@@ -1,7 +0,0 @@
|
||||
const renderTemplate = async (template, data) => {
|
||||
const { default: hbs } = await import("https://esm.sh/handlebars");
|
||||
return hbs.compile(template)(data);
|
||||
};
|
||||
export default renderTemplate;
|
||||
// Generation time: 14.818s
|
||||
// Result: PASS
|
||||
@@ -1,7 +0,0 @@
|
||||
async function renderTemplate(template, data = {}) {
|
||||
const { default: Handlebars } = await import('https://esm.sh/handlebars');
|
||||
return Handlebars.compile(template)(data);
|
||||
}
|
||||
export default renderTemplate;
|
||||
// Generation time: 23.189s
|
||||
// Result: PASS
|
||||
@@ -1,9 +0,0 @@
|
||||
let h,p;
|
||||
|
||||
const renderTemplate=async(t,d)=>{
|
||||
h??=await(p||=import('https://esm.sh/handlebars@4.7.8').then(m=>m.default));
|
||||
return h.compile(t)(d);
|
||||
};
|
||||
export default renderTemplate;
|
||||
// Generation time: 43.297s
|
||||
// Result: PASS
|
||||
@@ -1,16 +0,0 @@
|
||||
const loadHandlebars = (() => {
|
||||
let p;
|
||||
return () =>
|
||||
p ??= import('https://cdn.jsdelivr.net/npm/handlebars@4.7.8/+esm').then(
|
||||
m => m.default ?? m
|
||||
);
|
||||
})();
|
||||
|
||||
async function renderTemplate(template, data = {}) {
|
||||
if (typeof template !== 'string') throw new TypeError('template must be a string');
|
||||
if (!data || typeof data !== 'object' || Array.isArray(data)) throw new TypeError('data must be an object');
|
||||
return (await loadHandlebars()).compile(template)(data);
|
||||
}
|
||||
export default renderTemplate;
|
||||
// Generation time: 7.680s
|
||||
// Result: PASS
|
||||
@@ -1,8 +0,0 @@
|
||||
async function renderTemplate(template, data) {
|
||||
const { default: Handlebars } = await import('https://esm.sh/handlebars');
|
||||
const compiled = Handlebars.compile(template);
|
||||
return compiled(data);
|
||||
}
|
||||
export default renderTemplate;
|
||||
// Generation time: 22.419s
|
||||
// Result: PASS
|
||||
@@ -1,7 +0,0 @@
|
||||
const renderTemplate = async (template, data) => {
|
||||
const { default: H } = await import('https://cdn.jsdelivr.net/npm/handlebars@latest/dist/handlebars.module.js');
|
||||
return H.compile(template)(data);
|
||||
};
|
||||
export default renderTemplate;
|
||||
// Generation time: 39.777s
|
||||
// Result: FAIL
|
||||
@@ -1,7 +0,0 @@
|
||||
const renderTemplate = async (t, d) => {
|
||||
const { default: H } = await import('https://esm.sh/handlebars');
|
||||
return H.compile(t)(d);
|
||||
};
|
||||
export default renderTemplate;
|
||||
// Generation time: 42.272s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user