[][src]Function rslint_core::util::simple_bool_coerce

pub fn simple_bool_coerce(condition: Expr) -> Option<bool>

Attempt to check if a simple expression is always truthy or always falsey.

For example, true, false, and foo = true, this does not consider math ops like 0 + 0.