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 {ASTNode} node The node to split.
@returns {ASTNode[]} Array of conditions that makes the node when joined by the operator.