All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node_modules.bower.lib.templates.helpers.indent.js Maven / Gradle / Ivy

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;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy