Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
refactor(pluralizeFilter): Converted to Javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianlee44 committed Feb 15, 2015
1 parent 8942398 commit c3b5cf7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/filters/pluralize.coffee

This file was deleted.

22 changes: 22 additions & 0 deletions src/filters/pluralize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* @chalk overview
* @name Pluralize
* @description
* Pluralizes the given string. It's a simple proxy to the pluralize function on util.
*
* @param {String} string Noun to pluralize
* @param {Integer} count The numer of objects
* @param {Boolean} includeCount To include the number in formatted string
* @returns {String} Formatted plural
*/

angular.module('Mac').filter('pluralize', ['util', function(util) {
return function(string, count, includeCount) {
// Default includeCount to true
if (includeCount === undefined) {
includeCount = true;
}

return util.pluralize(string, count, includeCount);
};
}]);

0 comments on commit c3b5cf7

Please sign in to comment.