function splitByLogicalOperator(operator, node) {
  if (node.type === 'LogicalExpression' && node.operator === operator) {
    return [
      ...splitByLogicalOperator(operator, node.left),
      ...splitByLogicalOperator(operator, node.right)
    ]
  }
  return [node]
}
Splits the given node by the given logical operator.
@param {string} operator Logical operator `||` or `&&`.
@param {VExpression} node The node to split.
@returns {VExpression[]} Array of conditions that makes the node when joined by the operator.