Created
January 22, 2016 15:57
-
-
Save lkacenja/87d0f3c12347d8081e32 to your computer and use it in GitHub Desktop.
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
function parseBool(b) { | |
if (!!(b)) { | |
return b; | |
} | |
if (b == 'true') { | |
return true; | |
} | |
if (b == 'false' || b == 0 || b == null || b == undefined) { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment