UNPKG

538 BJavaScriptView Raw
1'use strict';
2
3/**
4 * Removes all symbols that begin with an underscore from the doc output. If
5 * you're using underscores to denote private variables in modules, this
6 * automatically hides them.
7 *
8 * @module plugins/underscore
9 */
10
11exports.handlers = {
12 newDoclet: function(e) {
13 var doclet = e.doclet;
14
15 // Ignore comment blocks for all symbols that begin with underscore
16 if (doclet.name.charAt(0) === '_' || doclet.name.substr(0, 6) === 'this._') {
17 doclet.access = 'private';
18 }
19 }
20};