documentation/lib/filter_access.js
Tom MacWright c24a9b88a4 Enable jsdoc rule and enforce it.
Also:

* Moves reduction out of parsers so that they don't have awkward
  function signatures
2015-09-28 20:36:07 -04:00

18 lines
519 B
JavaScript

'use strict';
/**
* Exclude given access levels from the generated documentation: this allows
* users to write documentation for non-public members by using the
* `@private` tag.
*
* @name access
* @public
* @param {Array<String>} [levels=[private]] excluded access levels.
* @param {Object} comment a parsed comment
* @return {boolean} whether the comment should be output
*/
module.exports = function (levels, comment) {
levels = levels || ['private'];
return levels.indexOf(comment.access) === -1;
};