I would use @namespace for "strings"
methods will just use @function (although for jsdoc it’s obvious that they
Edit
In your specific example, you can use something like:
String.prototype.stripHTML = function()
{
}
String.prototype.validHTML = function()
{
}
then used as follows:
var str = "bob<br/>";
str = str.stripHTML();
source
share