* Look for classes or functions with the same name as modules (which indicates that the module * exports only that class or function), then attach the classes or functions to the `module` * property of the appropriate module doclets. The name of each class or function is also updated * for displa
(doclets, modules)
| 260 | * @param {Array.<module:jsdoc/doclet.Doclet>} modules - The array of module doclets to search. |
| 261 | */ |
| 262 | function attachModuleSymbols(doclets, modules) { |
| 263 | var symbols = {}; |
| 264 | |
| 265 | // build a lookup table |
| 266 | doclets.forEach(function(symbol) { |
| 267 | symbols[symbol.longname] = symbols[symbol.longname] || []; |
| 268 | symbols[symbol.longname].push(symbol); |
| 269 | }); |
| 270 | |
| 271 | return modules.map(function(module) { |
| 272 | if (symbols[module.longname]) { |
| 273 | module.modules = symbols[module.longname] |
| 274 | // Only show symbols that have a description. Make an exception for classes, because |
| 275 | // we want to show the constructor-signature heading no matter what. |
| 276 | .filter(function(symbol) { |
| 277 | return symbol.description || symbol.kind === 'class'; |
| 278 | }) |
| 279 | .map(function(symbol) { |
| 280 | symbol = doop(symbol); |
| 281 | |
| 282 | if (symbol.kind === 'class' || symbol.kind === 'function') { |
| 283 | symbol.name = symbol.name.replace('module:', '(require("') + '"))'; |
| 284 | } |
| 285 | |
| 286 | return symbol; |
| 287 | }); |
| 288 | } |
| 289 | }); |
| 290 | } |
| 291 | |
| 292 | function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) { |
| 293 | var nav = ''; |
no outgoing calls
no test coverage detected
searching dependent graphs…