work.suroh.tk/node_modules/@11ty/eleventy/test/stubs/class-data-permalink-async-...

21 lines
368 B
JavaScript
Raw Normal View History

2019-12-02 12:22:45 +00:00
class Test {
get data() {
return {
key: "value1",
permalink: async function(data) {
return new Promise((resolve, reject) => {
setTimeout(function() {
resolve(`/my-permalink/${data.key}/`);
}, 100);
});
}
};
}
render({ name }) {
return `<p>${name}</p>`;
}
}
module.exports = Test;