template/publish.js
function improveFunc(doclet) {
    doclet.signature = doclet.name + '(';
    _.each(doclet.params, function(p, i) {
      if (!(p && p.type && p.type.names)) {
        logger.debug('Bad parameter', p, doclet.longname);
        return;
      }
      p.signature = ':param ' +
        p.type && p.type.names && p.type.names.join('|');
      p.signature += ' ' + p.name;

      if (p.optional) {
        doclet.signature += '[';
      }
      if (i > 0) {
        doclet.signature += ', ';
      }
      doclet.signature += p.name;
      if (p.optional) {
        doclet.signature += ']';
      }
      return p.name;
    });
    doclet.signature += ')';

    _.each(doclet.returns, function(r) {
      if (!(r && r.type && r.type.names)) {
        logger.debug('Bad return', r, doclet.longname);
        return;
      }
      r.signature = ':return ' +
        r.type && r.type.names && r.type.names.join('|');
    });
  }
function improveFunc(doclet) {
    doclet.signature = doclet.name + '(';
    _.each(doclet.params, function(p, i) {
      if (!(p && p.type && p.type.names)) {
        logger.debug('Bad parameter', p, doclet.longname);
        return;
      }
      p.signature = ':param ' +
        p.type && p.type.names && p.type.names.join('|');
      p.signature += ' ' + p.name;

      if (p.optional) {
        doclet.signature += '[';
      }
      if (i > 0) {
        doclet.signature += ', ';
      }
      doclet.signature += p.name;
      if (p.optional) {
        doclet.signature += ']';
      }
      return p.name;
    });
    doclet.signature += ')';

    _.each(doclet.returns, function(r) {
      if (!(r && r.type && r.type.names)) {
        logger.debug('Bad return', r, doclet.longname);
        return;
      }
      r.signature = ':return ' +
        r.type && r.type.names && r.type.names.join('|');
    });
  }
function improveFunc ( doclet ) { doclet . signature = doclet . name + '(' ; _ . each ( doclet . params , function ( p , i ) { if ( ! ( p && p . type && p . type . names ) ) { logger . debug ( 'Bad parameter' , p , doclet . longname ) ; return ; } p . signature = ':param ' + p . type && p . type . names && p . type . names . join ( '|' ) ; p . signature += ' ' + p . name ; if ( p . optional ) { doclet . signature += '[' ; } if ( i > 0 ) { doclet . signature += ', ' ; } doclet . signature += p . name ; if ( p . optional ) { doclet . signature += ']' ; } return p . name ; } ) ; doclet . signature += ')' ; _ . each ( doclet . returns , function ( r ) { if ( ! ( r && r . type && r . type . names ) ) { logger . debug ( 'Bad return' , r , doclet . longname ) ; return ; } r . signature = ':return ' + r . type && r . type . names && r . type . names . join ( '|' ) ; } ) ; }
Write the function signature for the current function doclet.

@param  {object} doclet function doclet
Write the function signature for the current function doclet .