function isStaticBoolean(scope, node) {
	switch (node.type) {
		case "Literal":
			return typeof node.value === "boolean";
		case "CallExpression":
			return (
				node.callee.type === "Identifier" &&
				node.callee.name === "Boolean" &&
				isReferenceToGlobalVariable(scope, node.callee) &&
				(node.arguments.length === 0 ||
					isConstant(scope, node.arguments[0], true))
			);
		case "UnaryExpression":
			return (
				node.operator === "!" && isConstant(scope, node.argument, true)
			);
		default:
			return false;
	}
}
Test if an AST node is a boolean value that never changes. Specifically we
test for:
1. Literal booleans (`true` or `false`)
2. Unary `!` expressions with a constant value
3. Constant booleans created via the `Boolean` global function
@param {Scope} scope The scope in which the node was found.
@param {ASTNode} node The node to test
@returns {boolean} Is `node` guaranteed to be a boolean?