Created
August 31, 2016 13:47
-
-
Save rootedsoftware/7be337529c9bda8475abf2b818dce733 to your computer and use it in GitHub Desktop.
Function which converts string "Y" or "N" to true and false
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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