I have a class which contains this method
/**
* Uses the native RegExp object and the native string.replace to replace text
* @name _replace
* @param {String} find Text string or regex to search for
* @param {String} replace Text string or regex for replacing
* @param {String} string String to perfom the replace on
* @returns {String} Returns the string with the text replaced
*/
this._replace = function(find, replace, str) {
var regex;
if(typeof find !== undefined && replace !== undefined && typeof str === 'string') {
regex = new RegExp(find, this._getFlags());
return str.replace(regex, replace, str);
} else {
return false;
}
};
It is prefixed with _ to distinguish it from the replace method which is for the public interface. Why won't JSDoc document this method when it has a _ in front? If I remove it it documents it perfectly. Is there anything I can do to make JSDoc document this method?