Skip to content

Instantly share code, notes, and snippets.

@nidhhoggr
Created December 1, 2013 19:36
Show Gist options
  • Save nidhhoggr/7739811 to your computer and use it in GitHub Desktop.
Save nidhhoggr/7739811 to your computer and use it in GitHub Desktop.
pluralization method
pluralize = function(str) {
str = str + 's';
if(_.string.endsWith(str,'ys'))
str = str.replace('ys','ies')
return str;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment