work.suroh.tk/node_modules/@11ty/eleventy/test/stubs/oneinstance.11ty.js

19 lines
240 B
JavaScript
Raw Normal View History

2019-12-02 12:22:45 +00:00
class Test {
constructor() {
this.rand = Math.random();
}
get data() {
return {
name: "Ted",
rand: this.rand
};
}
render({ name }) {
return `<p>${name}${this.rand}</p>`;
}
}
module.exports = Test;