Plato on Github
Report Home
ampersand/lib/helpers/process-template.js
Maintainability
92.10
Lines of code
8
Difficulty
4.00
Estimated Errors
0.04
Function weight
By Complexity
By SLOC
// super simple template engine var RE = /\{\{\{\s*(\S+)\s*\}\}\}/g; module.exports = function processTemplate(templateString, context, rewrite) { return templateString.replace(RE, function (whole, specific) { return context[specific]; }); };