lib/parser.js
function parseAuthor (node, nodeType, feedType) {
  var authorNode = node.author,
      author;

  //Both meta and item have author property as top priority and share parsing logic.
  if (authorNode && (author = utils.get(authorNode))) {
    author = addressparser(author)[0];
    return author.name || author.address;
  }
  else if (authorNode && (author = utils.get(authorNode.name) || utils.get(authorNode.email))) {
    return author;
  }
  // use addressparser to parse managingeditor or webmaster properties for meta nodes
  else if (nodeType === 'meta' && (author = utils.get(node.managingeditor) || utils.get(node.webmaster))) {
    author = addressparser(author)[0];
    return author.name || author.address;
  }
  //parse the next properties in order
  else if (author = utils.getFirstFoundPropValue(node, ['dc:creator', 'itunes:author', 'dc:publisher'])) {
    return author;
  }
  else if (node['itunes:owner'] && (author = utils.get(node['itunes:owner']['itunes:name']) || utils.get(node['itunes:owner']['itunes:email']))) {
    return author;
  }

  return null;
}
function parseAuthor (node, nodeType, feedType) {
  var authorNode = node.author,
      author;

  //Both meta and item have author property as top priority and share parsing logic.
  if (authorNode && (author = utils.get(authorNode))) {
    author = addressparser(author)[0];
    return author.name || author.address;
  }
  else if (authorNode && (author = utils.get(authorNode.name) || utils.get(authorNode.email))) {
    return author;
  }
  // use addressparser to parse managingeditor or webmaster properties for meta nodes
  else if (nodeType === 'meta' && (author = utils.get(node.managingeditor) || utils.get(node.webmaster))) {
    author = addressparser(author)[0];
    return author.name || author.address;
  }
  //parse the next properties in order
  else if (author = utils.getFirstFoundPropValue(node, ['dc:creator', 'itunes:author', 'dc:publisher'])) {
    return author;
  }
  else if (node['itunes:owner'] && (author = utils.get(node['itunes:owner']['itunes:name']) || utils.get(node['itunes:owner']['itunes:email']))) {
    return author;
  }

  return null;
}
function parseAuthor ( node , nodeType , feedType ) { var authorNode = node . author , author ; //Both meta and item have author property as top priority and share parsing logic. if ( authorNode && ( author = utils . get ( authorNode ) ) ) { author = addressparser ( author ) [ 0 ] ; return author . name || author . address ; } else if ( authorNode && ( author = utils . get ( authorNode . name ) || utils . get ( authorNode . email ) ) ) { return author ; } // use addressparser to parse managingeditor or webmaster properties for meta nodes else if ( nodeType === 'meta' && ( author = utils . get ( node . managingeditor ) || utils . get ( node . webmaster ) ) ) { author = addressparser ( author ) [ 0 ] ; return author . name || author . address ; } //parse the next properties in order else if ( author = utils . getFirstFoundPropValue ( node , [ 'dc:creator' , 'itunes:author' , 'dc:publisher' ] ) ) { return author ; } else if ( node [ 'itunes:owner' ] && ( author = utils . get ( node [ 'itunes:owner' ] [ 'itunes:name' ] ) || utils . get ( node [ 'itunes:owner' ] [ 'itunes:email' ] ) ) ) { return author ; } return null ; }
Parses the author for meta and item nodes

- author
- highest priority in ATOM and RSS feeds for both meta and item nodes
- more commonly found in ATOM feeds than RSS feeds
- managingeditor
- next highest priority for RSS feeds in meta nodes
- more commonly found in RSS feeds and rarely found in ATOM feeds if ever
- generally more specific than webmaster
- webmaster
- next highest priority for RSS feeds in meta nodes
- more commonly found in RSS feeds and rarely found in ATOM feeds if ever
- generally less specific than managingeditor
- dc:creator
- next highest priority for meta and item nodes in RSS feeds, and item nodes in ATOM feeds
- rarely found in meta nodes for ATOM feeds if ever
- can include an author, email, or entity name
- itunes:author
- next highest priority for meta and item nodes in RSS feeds
- sometimes found in RSS feeds, rarely found in ATOM feeds if ever
- can include an author, email, or entity name
- dc:publisher
- next highest priority for meta and item nodes in RSS feeds
- sometimes found in RSS feeds, rarely found in ATOM feeds if ever
- can include an author, email, or entity name
- itunes:owner
- least priority for meta nodes in RSS feeds
- rarely found in item nodes for RSS feeds, or meta and item nodes for ATOM feeds if ever
- can include an author, email, or entity name

@param node
@param nodeType
@param feedType
@returns {string}
Parses the author for meta and item nodes