forked from DGNum/gestioCOF
pluralize function
This commit is contained in:
parent
ee54b36696
commit
e52c44580f
1 changed files with 5 additions and 0 deletions
|
@ -138,3 +138,8 @@ function requestAuth(data, callback, focus_next = null) {
|
|||
|
||||
});
|
||||
}
|
||||
|
||||
String.prototype.pluralize = function(count, irreg_plural = false) {
|
||||
plural = irreg_plural ? irreg_plural : this + 's' ;
|
||||
return (count==1 ? this : plural) ;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue