We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a302f1 commit 15bf4a8Copy full SHA for 15bf4a8
parse-names.js
@@ -20,9 +20,11 @@ Array.prototype.implode = function (separator) {
20
}
21
return output;
22
};
23
-String.prototype.trim = function() {
24
- return this.replace(/^\s+|\s+$|\,$/g,"");
25
-};
+if (!String.prototype.trim) {
+ String.prototype.trim = function () {
+ return this.replace(/^\s+|\s+$/gm, '');
26
+ };
27
+}
28
String.prototype.ucfirst = function() {
29
return this.substr(0,1).toUpperCase() + this.substr(1,this.length - 1).toLowerCase();
30
0 commit comments