title: Javascript - Nice way to convert 1/0 & 'true'/'false' & true/false to boolean
body: <p>I have a variable that could sometimes be passed as 1/0 (both integer number or the string number), or it could be passed as a string 'true'/'false' or as an actual boolean true/false. I want to convert all of the cases to an actual boolean. </p>
  
  <p>Other than doing a bunch of <code>if</code> statements and the <code>===</code> is there a faster and more elegant way of doing this?</p>