Skip to content

Instantly share code, notes, and snippets.

@bryanforbes
Created April 18, 2011 03:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bryanforbes/924771 to your computer and use it in GitHub Desktop.
Save bryanforbes/924771 to your computer and use it in GitHub Desktop.
var Boolean = (function(){
var undefinedThis = (function(){
return this; // this depends on strict mode
})();
function Boolean(arg){
if(this == undefinedThis){
return !!arg;
}else{
return {};
}
}
return Boolean;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment