Skip to content

Instantly share code, notes, and snippets.

@james2doyle
Created April 17, 2014 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save james2doyle/11008289 to your computer and use it in GitHub Desktop.
Save james2doyle/11008289 to your computer and use it in GitHub Desktop.
String.prototype.bool lets you check to see if a string is true or false
String.prototype.bool = function() {
return (/^true$/i).test(this);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment