8000 Even more documentation · documentationjs/documentation@aadb8ad · GitHub
[go: up one dir, main page]

Skip to content

Commit aadb8ad

Browse files
committed
Even more documentation
1 parent 09a4faa commit aadb8ad

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

lib/infer/name.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,25 @@ module.exports = function () {
4545
// infer the named based on the `property` of the MemberExpression (`bar`)
4646
// rather than the `object` (`foo`).
4747
comment.context.ast.traverse({
48+
/**
49+
* Attempt to extract the name from an Identifier node.
50+
* If the name can be resolved, it will stop traversing.
51+
* @param {Object} path ast path
52+
* @returns {undefined} has side-effects
53+
* @private
54+
*/
4855
Identifier: function (path) {
4956
if (inferName(path, path.node)) {
5057
path.stop();
5158
}
5259
},
60+
/**
61+
* Attempt to extract the name from an Identifier node.
62+
* If the name can be resolved, it will stop traversing.
63+
* @param {Object} path ast path
64+
* @returns {undefined} has side-effects
65+
* @private
66+
*/
5367
MemberExpression: function (path) {
5468
if (inferName(path, path.node.property)) {
5569
path.stop();

lib/input/dependency.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ var mdeps = require('module-deps-sortable'),
2424
function dependencyStream(indexes, options, callback) {
2525
var filterer = filterJS(options.extension, options.polyglot);
2626
var md = mdeps({
27+
/**
28+
* Determine whether a module should be included in documentation
29+
* @param {string} id path to a module
30+
* @returns {boolean} true if the module should be included.
31+
*/
2732
filter: function (id) {
2833
return !!options.external || moduleFilters.internalOnly(id);
2934
},

lib/parse.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,13 @@ var flatteners = {
260260
result.access = 'private';
261261
},
262262
'prop': synonym('property'),
263+
/**
264+
* Parse tag
265+
* @private
266+
* @param {Object} result target comment
267+
* @param {Object} tag the tag
268+
* @returns {undefined} has side-effects
269+
*/
263270
'property': function (result, tag) {
264271
if (!result.properties) {
265272
result.properties = [];
@@ -403,6 +410,10 @@ var flatteners = {
403410
'virtual': synonym('abstract')
404411
};
405412

413+
/**
414+
* A no-op function for unsupported tags
415+
* @returns {undefined} does nothing
416+
*/
406417
function todo() {}
407418

408419
/**

0 commit comments

Comments
 (0)
0