Camelize String - Node.js String

Node.js examples for String:Case

Description

Camelize String

Demo Code


String.prototype.camelize = function() {
    return this.replace(/\-(\w)/ig, function(a, b) {
        return b.toUpperCase();
    });/*from w  w  w  .ja  v a2 s. c  o  m*/
};

Related Tutorials