Get String pluralize format - Node.js String

Node.js examples for String:Format

Description

Get String pluralize format

Demo Code


if(!String.prototype.pluralize) {
    String.prototype.pluralize = function(counter, plural) {
        return counter + ' ' + (counter == 1 ? this : plural || this + 's');
    };//from  www . j  a  va  2  s.  c o m
}

Related Tutorials