Blame view

node_modules/bower/lib/templates/helpers/indent.js 331 Bytes
2dda2e10   Administrator   generator ignore
1
2
3
4
5
6
7
8
9
10
11
12
  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;