Is it possible to have a custom boolean object that inherits from Boolean.prototype?
<p>Something in the lines of:</p>

<pre><code>  var MyCustomBoolean = function(b){
    if (b === 'FALSE'){
      this.b = false;
    }else if(b === 'TRUE'){
      this.b = true;
    }

    this.valueOf = function(){
      return this.b;
    }
  }
</code></pre>

<p>so that the following would produce a single alert with the text "in your face"</p>

<pre><code>if (new MyCustomBoolean('TRUE')){
  alert("In your face!");
}

if (new MyCustomBoolean('FALSE')){
  alert("not so much.");
}
</code></pre>

<p>Now i can work around this by explicitly calling the valueOf function or. by checking equivalence through "myBObj == true".</p>

<p>So is it possible to have a custom boolean object that inherits from Boolean.prototype such that i could write if blocks as described above?</p>
