insomnia/app/lib/render.js

8 lines
180 B
JavaScript
Raw Normal View History

import nunjucks from 'nunjucks';
2016-04-15 02:13:49 +00:00
2016-04-15 05:23:54 +00:00
nunjucks.configure({autoescape: false});
2016-04-10 02:58:48 +00:00
2016-04-15 05:23:54 +00:00
export default function (template, context = {}) {
2016-04-15 02:13:49 +00:00
return nunjucks.renderString(template, context);
2016-04-10 02:58:48 +00:00
}