If I have a function that's only ever used inside of another function, I don't think it should it require documentation:
/**
* Find capitalized words.
*/
var capitalizedWords = function(words) {
var isCapitalized = function(string) { return string.match(/^[A-Z]/); };
return words.filter(isCapitalized);
};
In the above example, isCapitalized would never be accessible to anyone. This doesn't seem much different from not documenting the anonymous version:
/**
* Find capitalized words.
*/
var capitalizedWords = function(words) {
return words.filter(function(string) { return string.match(/^[A-Z]/); });
};
Would an option for enforceExistence to let these go undocumented be a good addition? Would it be hard to add?
If I have a function that's only ever used inside of another function, I don't think it should it require documentation:
In the above example,
isCapitalizedwould never be accessible to anyone. This doesn't seem much different from not documenting the anonymous version:Would an option for enforceExistence to let these go undocumented be a good addition? Would it be hard to add?