website/docgen/processors/tag-fixer.js
function(doc) {
  // Skip if the function has a name.
  if (doc.name) {
    return doc.name;
  }

  try {
    var node = doc.codeNode;

    // Is this a simple declaration? "var element = function() {".
    if (node.declarations && node.declarations.length) {
      return node.declarations[0].id.name;
    }

    // Is this an expression? "elementFinder.find = function() {".
    if (node.expression) {
      var parts = [];

      /**
       * Recursively create the function name by examining the object property.
       * @param obj Parsed object.
       * @return {string} The name of the function.
       */
      function buildName(obj) {
        if (!obj) {
          return parts.join('.');
        }

        if (obj.property && obj.property.name) {
          parts.unshift(obj.property.name);
        }

        if (obj.object && obj.object.name) {
          parts.unshift(obj.object.name);
        }

        return buildName(obj.object);
      }

      return buildName(node.expression.left);
    }
  } catch (e) {
    console.log('Could not find document name', doc.file, doc.endingLine);
  }
}
function(doc) {
  // Skip if the function has a name.
  if (doc.name) {
    return doc.name;
  }

  try {
    var node = doc.codeNode;

    // Is this a simple declaration? "var element = function() {".
    if (node.declarations && node.declarations.length) {
      return node.declarations[0].id.name;
    }

    // Is this an expression? "elementFinder.find = function() {".
    if (node.expression) {
      var parts = [];

      /**
       * Recursively create the function name by examining the object property.
       * @param obj Parsed object.
       * @return {string} The name of the function.
       */
      function buildName(obj) {
        if (!obj) {
          return parts.join('.');
        }

        if (obj.property && obj.property.name) {
          parts.unshift(obj.property.name);
        }

        if (obj.object && obj.object.name) {
          parts.unshift(obj.object.name);
        }

        return buildName(obj.object);
      }

      return buildName(node.expression.left);
    }
  } catch (e) {
    console.log('Could not find document name', doc.file, doc.endingLine);
  }
}
function ( doc ) { // Skip if the function has a name. if ( doc . name ) { return doc . name ; } try { var node = doc . codeNode ; // Is this a simple declaration? "var element = function() {". if ( node . declarations && node . declarations . length ) { return node . declarations [ 0 ] . id . name ; } // Is this an expression? "elementFinder.find = function() {". if ( node . expression ) { var parts = [ ] ; /**
       * Recursively create the function name by examining the object property.
       * @param obj Parsed object.
       * @return {string} The name of the function.
       */ function buildName ( obj ) { if ( ! obj ) { return parts . join ( '.' ) ; } if ( obj . property && obj . property . name ) { parts . unshift ( obj . property . name ) ; } if ( obj . object && obj . object . name ) { parts . unshift ( obj . object . name ) ; } return buildName ( obj . object ) ; } return buildName ( node . expression . left ) ; } } catch ( e ) { console . log ( 'Could not find document name' , doc . file , doc . endingLine ) ; } }
Find the name of the function.
Find the name of the function .