makeHelpers typedef documentjs.generators.html.types.makeHelpers {function(docMap, options, getCurrent, helpers)} source function(docMap, options, getCurrent, helpers) Parameters docMap {docMap} Contains every docObject keyed by its name. options {Object} The options passed to generate. getCurrent {function()} Returns the current docObject being rendered. helpers {generators.html} The default helpers object that the return value will be added to. Returns {Object<String,function()>} A map of Handlebars function helpers that will be registered. Use To create a helper that loops through every function's name excluding the current page's name: module.exports = function(docMap,options,getCurrent, defaultHelpers, Handlebars){ return { eachFunction: function(options){ for(var name in docMap) { var docObject = docMap[name]; if(docObject.type === "function" && name !== getCurrent().name) { return options.fn(name); } } } }; };
Use
To create a helper that loops through every function's name excluding the current page's name: