dav.js
function traverseChild(node, childNode, childspec, result) {
  if (childNode.nodeType === 3 && /^\s+$/.test(childNode.nodeValue)) {
    // Whitespace... nothing to do.
    return;
  }

  var localName = (0, _camelize2['default'])(childNode.localName, '-');
  if (!(localName in childspec)) {
    debug('Unexpected node of type ' + localName + ' encountered while ' + 'parsing ' + node.localName + ' node!');
    var value = childNode.textContent;
    if (localName in result) {
      if (!Array.isArray(result[localName])) {
        // Since we've already encountered this node type and we haven't yet
        // made an array for it, make an array now.
        result[localName] = [result[localName]];
      }

      result[localName].push(value);
      return;
    }

    // First time we're encountering this node.
    result[localName] = value;
    return;
  }

  var traversal = traverse[localName](childNode);
  if (childspec[localName]) {
    // Expect multiple.
    result[localName].push(traversal);
  } else {
    // Expect single.
    result[localName] = traversal;
  }
}
function traverseChild(node, childNode, childspec, result) {
  if (childNode.nodeType === 3 && /^\s+$/.test(childNode.nodeValue)) {
    // Whitespace... nothing to do.
    return;
  }

  var localName = (0, _camelize2['default'])(childNode.localName, '-');
  if (!(localName in childspec)) {
    debug('Unexpected node of type ' + localName + ' encountered while ' + 'parsing ' + node.localName + ' node!');
    var value = childNode.textContent;
    if (localName in result) {
      if (!Array.isArray(result[localName])) {
        // Since we've already encountered this node type and we haven't yet
        // made an array for it, make an array now.
        result[localName] = [result[localName]];
      }

      result[localName].push(value);
      return;
    }

    // First time we're encountering this node.
    result[localName] = value;
    return;
  }

  var traversal = traverse[localName](childNode);
  if (childspec[localName]) {
    // Expect multiple.
    result[localName].push(traversal);
  } else {
    // Expect single.
    result[localName] = traversal;
  }
}
function traverseChild ( node , childNode , childspec , result ) { if ( childNode . nodeType === 3 && / ^\s+$ / . test ( childNode . nodeValue ) ) { // Whitespace... nothing to do. return ; } var localName = ( 0 , _camelize2 [ 'default' ] ) ( childNode . localName , '-' ) ; if ( ! ( localName in childspec ) ) { debug ( 'Unexpected node of type ' + localName + ' encountered while ' + 'parsing ' + node . localName + ' node!' ) ; var value = childNode . textContent ; if ( localName in result ) { if ( ! Array . isArray ( result [ localName ] ) ) { // Since we've already encountered this node type and we haven't yet // made an array for it, make an array now. result [ localName ] = [ result [ localName ] ] ; } result [ localName ] . push ( value ) ; return ; } // First time we're encountering this node. result [ localName ] = value ; return ; } var traversal = traverse [ localName ] ( childNode ) ; if ( childspec [ localName ] ) { // Expect multiple. result [ localName ] . push ( traversal ) ; } else { // Expect single. result [ localName ] = traversal ; } }
Parse child childNode of node with childspec and write outcome to result.
Parse child childNode of node with childspec and write outcome to result .