Is there a minimalistic syntax to do the same as x === 0 ? true : !!x.
The goal of this expression is to avoid the exclusion of zero as falsy and yet make sure other falsy values do are converted to false.
Basically, you want to allow any number?
typeof x === 'number'
The most minimalist syntax I can think of is
x === 0 || Boolean(x)
I'm not sure that there's a better solution than what you've got. You could also use !!x || x === 0 though