lib/utils/dom.spec-helper.js
function getSibling(node, relativeIndex) {
  var parent = node.parentNode;
  if (parent === null) {
    return null;
  }
  var currentIndex = parent.childNodes.indexOf(node);
  var siblingIndex = currentIndex + relativeIndex;
  if (siblingIndex < 0 || siblingIndex > parent.childNodes.length - 1) {
    return null;
  }
  return parent.childNodes[siblingIndex];
}
function getSibling(node, relativeIndex) {
  var parent = node.parentNode;
  if (parent === null) {
    return null;
  }
  var currentIndex = parent.childNodes.indexOf(node);
  var siblingIndex = currentIndex + relativeIndex;
  if (siblingIndex < 0 || siblingIndex > parent.childNodes.length - 1) {
    return null;
  }
  return parent.childNodes[siblingIndex];
}
function getSibling ( node , relativeIndex ) { var parent = node . parentNode ; if ( parent === null ) { return null ; } var currentIndex = parent . childNodes . indexOf ( node ) ; var siblingIndex = currentIndex + relativeIndex ; if ( siblingIndex < 0 || siblingIndex > parent . childNodes . length - 1 ) { return null ; } return parent . childNodes [ siblingIndex ] ; }
returns a sibling of given node
returns a sibling of given node