UNPKG

roosevelt

Version:

🧸 MVC web framework for Node.js designed to make Express easier to use.

5 lines (4 loc) • 230 B
module.exports = (templateString, dataModel) => { const templateFunction = new Function(...Object.keys(dataModel), `return \`${templateString}\`;`) // eslint-disable-line return templateFunction(...Object.values(dataModel)) }