lib/util/Components.js
function(node) {
      if (!node.value || !node.value.body || !node.value.body.body) {
        return false;
      }
      var i = node.value.body.body.length - 1;
      for (; i >= 0; i--) {
        if (node.value.body.body[i].type === 'ReturnStatement') {
          return node.value.body.body[i];
        }
      }
      return false;
    }
function(node) {
      if (!node.value || !node.value.body || !node.value.body.body) {
        return false;
      }
      var i = node.value.body.body.length - 1;
      for (; i >= 0; i--) {
        if (node.value.body.body[i].type === 'ReturnStatement') {
          return node.value.body.body[i];
        }
      }
      return false;
    }
function ( node ) { if ( ! node . value || ! node . value . body || ! node . value . body . body ) { return false ; } var i = node . value . body . body . length - 1 ; for ( ; i >= 0 ; i -- ) { if ( node . value . body . body [ i ] . type === 'ReturnStatement' ) { return node . value . body . body [ i ] ; } } return false ; }
Find a return statment in the current node

@param {ASTNode} ASTnode The AST node being checked
Find a return statment in the current node