work.suroh.tk/node_modules/@11ty/eleventy/test/stubs/multipleexports-promises.11...

16 lines
332 B
JavaScript

exports.data = async function() {
return new Promise((resolve, reject) => {
setTimeout(function() {
resolve({ name: "Ted" });
}, 100);
});
};
exports.render = async function({ name }) {
return new Promise((resolve, reject) => {
setTimeout(function() {
resolve(`<p>${name}</p>`);
}, 100);
});
};