File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,25 @@ module.exports = function () {
45
45
// infer the named based on the `property` of the MemberExpression (`bar`)
46
46
// rather than the `object` (`foo`).
47
47
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
+ */
48
55
Identifier : function ( path ) {
49
56
if ( inferName ( path , path . node ) ) {
50
57
path . stop ( ) ;
51
58
}
52
59
} ,
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
+ */
53
67
MemberExpression : function ( path ) {
54
68
if ( inferName ( path , path . node . property ) ) {
55
69
path . stop ( ) ;
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ var mdeps = require('module-deps-sortable'),
24
24
function dependencyStream ( indexes , options , callback ) {
25
25
var filterer = filterJS ( options . extension , options . polyglot ) ;
26
26
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
+ */
27
32
filter : function ( id ) {
28
33
return ! ! options . external || moduleFilters . internalOnly ( id ) ;
29
34
} ,
Original file line number Diff line number Diff line change @@ -260,6 +260,13 @@ var flatteners = {
260
260
result . access = 'private' ;
261
261
} ,
262
262
'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
+ */
263
270
'property' : function ( result , tag ) {
264
271
if ( ! result . properties ) {
265
272
result . properties = [ ] ;
@@ -403,6 +410,10 @@ var flatteners = {
403
410
'virtual' : synonym ( 'abstract' )
404
411
} ;
405
412
413
+ /**
414
+ * A no-op function for unsupported tags
415
+ * @returns {undefined } does nothing
416
+ */
406
417
function todo ( ) { }
407
418
408
419
/**
You can’t perform that action at this time.
0 commit comments