Files
old-lab_ui/node_modules/bower/lib/templates/helpers/indent.js
2019-06-04 13:11:32 -04:00

13 lines
330 B
JavaScript

var mout = require('mout');
function indent(Handlebars) {
Handlebars.registerHelper('indent', function(context) {
var hash = context.hash;
var indentStr = mout.string.repeat(' ', parseInt(hash.level, 10));
return context.fn(this).replace(/\n/g, '\n' + indentStr);
});
}
module.exports = indent;