Files: c5c7a8ffadbd51aa28a5f3f096fe43f69405da44 / test / test-79-npm / ejs / ejs.js
285 bytesRaw
1 | ; |
2 | |
3 | var ejs = require('ejs'); |
4 | |
5 | var s = '<% if (user) { %>' + |
6 | '<h2><%= user.name %></h2>' + |
7 | '<% } %>'; |
8 | |
9 | var template = ejs.compile(s, { client: true }); |
10 | var out = template({ user: { name: 'klopov' } }); |
11 | if (out === '<h2>klopov</h2>') { |
12 | console.log('ok'); |
13 | } |
14 |
Built with git-ssb-web