DocumentJS.types.function  class     

Documents a function. Doc can guess at a functions name and params if the source following a comment matches something like:

myFuncOne : function(param1, param2){}  //or
myFuncTwo = function(param1, param2){}  

Directives

Use the following directives to document a function.

@function  functionName                       -> Forces a function
@param  {optional:type} paramName Description -> Describes a parameter
@return  {type} Description                    -> Describes the return value

Example

/* Adds, Mr. or Ms. before someone's name
 * @param  {String} name the persons name
 * @param  {optional:Boolean} gender true if a man, false if female.  Defaults to true.
 * @return  {String} returns the appropriate honorific before the person's name.
 */  
honorific = function(name, gender){
© Jupiter IT - JavaScriptMVC Training and Support