mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
13 lines
331 B
JavaScript
13 lines
331 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;
|