Created
August 18, 2017 02:30
-
-
Save clarketm/6ba915e988adc7f1df2b0bf75dce8e95 to your computer and use it in GitHub Desktop.
String.prototype.toTitleCase
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
String.prototype.toTitleCase = function () { | |
return this[0].toUpperCase() + this.substring(1).toLowerCase(); | |
}; | |
module.exports = String; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment