I\'m guessing this is probably application specific however I am using node.js - as long as it works in the v8 engine, I don\'t mind.
I\'m trying to create an
The closest you can get is like
if (+obj)
Where a falsy object defines a .valueOf() function that returns 0 or false:
.valueOf()
0
false
var o = { valueOf: function() { return false; } }; if (+o) { throw unreachable(); }