Nodejs Utililty Methods String Normalize

List of utility methods to do String Normalize

Description

The list of methods to do String Normalize are organized into topic(s).

Method

nominalize()
String.prototype.nominalize = function() {
  return this.charAt(0).toUpperCase() + this.slice(1);
};
normalize()
String.prototype.normalize = function(){
  return this.trim().replace(/\s{2,}/g, ' ');
};
normalize()
String.prototype.normalize = function () {
  return this.replace(/\W/g, "");
normalize()
String.prototype.normalize = function(){
    return this.replace(/\<[\/a-z \"=]*\>|\n/g,' ').toLowerCase();
normalize(s)
String.prototype.normalize = function(s) {
    return this.replace(new RegExp(s + "+", "gm"), s);
};