Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rootedsoftware/7be337529c9bda8475abf2b818dce733 to your computer and use it in GitHub Desktop.
Save rootedsoftware/7be337529c9bda8475abf2b818dce733 to your computer and use it in GitHub Desktop.
Function which converts string "Y" or "N" to true and false
var convertStringToBoolean = function(yourVariable){
return yourVariable ? yourVariable === "Y" ? true : false : null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment