work.suroh.tk/node_modules/pug-runtime/wrap.js

11 lines
236 B
JavaScript
Raw Normal View History

2019-12-02 12:22:45 +00:00
var runtime = require('./');
module.exports = wrap;
function wrap(template, templateName) {
templateName = templateName || 'template';
return Function('pug',
template + '\n' +
'return ' + templateName + ';'
)(runtime);
}