@@ -57,7 +57,7 @@ function expandInputs(indexes, options, callback) {
5757 * Generate JavaScript documentation as a list of parsed JSDoc
5858 * comments, given a root file as a path.
5959 *
60- * @name documentation
60+ * @alias documentation
6161 * @param {Array<string>|string } indexes files to process
6262 * @param {Object } options options
6363 * @param {Array<string> } options.external a string regex / glob match pattern
@@ -70,6 +70,8 @@ function expandInputs(indexes, options, callback) {
7070 * even in JavaScript code. With the polyglot option set, this has no effect.
7171 * @param {Array<string|Object> } [options.order=[]] optional array that
7272 * defines sorting order of documentation
73+ * @param {Array<string> } [options.access=[]] an array of access levels
74+ * to output in documentation
7375 * @param {Object } [options.hljs] hljs optional options
7476 * @param {boolean } [options.hljs.highlightAuto=false] hljs automatically detect language
7577 * @param {Array } [options.hljs.languages] languages for hljs to choose from
@@ -85,6 +87,10 @@ module.exports = function (indexes, options, callback) {
8587 indexes = [ indexes ] ;
8688 }
8789
90+ if ( ! options . access ) {
91+ options . access = [ 'public' , 'undefined' , 'protected' ] ;
92+ }
93+
8894 var parseFn = ( options . polyglot ) ? polyglot : parseJavaScript ;
8995
9096 return expandInputs ( indexes , options , function ( error , inputs ) {
@@ -93,8 +99,7 @@ module.exports = function (indexes, options, callback) {
9399 }
94100 try {
95101 callback ( null ,
96- filterAccess (
97- options . private ? [ ] : undefined ,
102+ filterAccess ( options . access ,
98103 hierarchy (
99104 inputs
100105 . filter ( filterJS ( options . extension ) )
0 commit comments