2
我有包含該方法如何讓JSDoc記錄我的_methods?
/**
* 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;
}
};
它帶有前綴_
從replace
方法,其是用於公共接口區分它的類。爲什麼JSDoc在前面有_
時不記錄這種方法?如果我刪除它,它完美的文件。有什麼我可以做JSDoc文件這個方法嗎?
非常好,謝謝。我放棄了對這個問題的迴應。不尋常的Stackoverflow的。 – MrMisterMan