s/X ? true : false/X/g !  At least when X is a comparison, as here.