(js) Extend String with method 'capitalize'

pull/91/head
Francis Lachapelle 2015-05-01 12:12:42 -04:00
parent 12d5b57624
commit 520103cffe
1 changed files with 4 additions and 0 deletions

View File

@ -69,6 +69,10 @@ String.prototype.base64decode = function() {
return output;
};
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);
}
String.prototype.asDate = function () {
var newDate;
var date = this.split("/");