uniformize
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -19,4 +19,4 @@ "use strict"; | ||
value: function(toLowerCase) { | ||
if (toLowerCase) return this.toLowerCase().charAt(0).toUpperCase() + this.slice(1); | ||
return this.charAt(0).toUpperCase() + this.slice(1); | ||
const text = toLowerCase ? this.toLowerCase() : this; | ||
return text.charAt(0).toUpperCase() + text.slice(1); | ||
}, | ||
@@ -27,4 +27,4 @@ enumerable: false | ||
value: function(toLowerCase) { | ||
if (toLowerCase) return this.toLowerCase().replace(/(^\w{1})|(\s+\w{1})/g, (char) => char.toUpperCase()); | ||
return this.replace(/(^\p{L})|(\s\p{L})/giu, (char) => char.toUpperCase()); | ||
const text = toLowerCase ? this.toLowerCase() : this; | ||
text.replace(/(^\w{1})|(\s+\w{1})/g, (char) => char.toUpperCase()); | ||
}, | ||
@@ -31,0 +31,0 @@ enumerable: false |
@@ -7,3 +7,3 @@ { | ||
"type": "commonjs", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"repository": { | ||
@@ -10,0 +10,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
15420