title: More elegant ways of converting YES/NO to true/false
body: <p>There might be a very basic thing that might be missing. Please let me know 
  if there is a better way to do this which is much more elegant than using the ternary operator in javascript.</p>
  
  <pre><code>if (data.isYellowCupcake === YES) {
    dataCopy.isCupcake = true;
  } else if (data.isYellowCupcake === NO) {
    dataCopy.isCupcake = false;
  }
  </code></pre>