UNPKG

253 BJavaScriptView Raw
1module.exports = compile
2
3function compile(html) {
4 return function(data) {
5 var out = html
6 data = data || {}
7 Object.keys(data).forEach(function(key) {
8 out = out.replace('<!-- @@' + key + ' -->', data[key])
9 })
10 return out
11 }
12}