Nodejs String to Pascal Case Convert toPascalCase()

Here you can find the source of toPascalCase()

Method Source Code

String.prototype.toPascalCase = function() {
    return this.charAt(0).toLowerCase() + this.slice(1);
};

Related

  1. toPascalCase()
    function checkVariable(value)
      return ( (value != undefined) && (value != null) );
    String.prototype.toPascalCase = function()
      return this.replace(/\w+/g, function(w){return w[0].toUpperCase() + w.slice(1).toLowerCase();});
    function thousandsSeparator(value)
    ...
    
  2. toPascalCase()
    var isEmpty = function(str) {
      return str && str.length > 0;
    };
    var isBlank = function(str) {
      return !str || /^\s*$/.test(str);
    };
    String.prototype.toPascalCase = function() {
      return this.replace(/\w\S*/g, function(txt) {
        return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
    ...