UNPKG

305 BJavaScriptView Raw
1'use restrict';
2
3function helper(paper) {
4 paper.handlebars.registerHelper('pre', function (value) {
5 var string = JSON.stringify(value, null, 2);
6
7 string = paper.handlebars.Utils.escapeExpression(string);
8
9 return '<pre>' + string + '</pre>';
10 });
11}
12
13module.exports = helper;