Angular adaption of the great work by @blakeembrey
Return a pluralized or singularized word based on the input string.
npm install pluralize --save
bower install pluralize --save
angular.module('MyApp', ['jp.pluralise']);
angular.module('MyApp')
.controller('MyController',ctrl)
ctrl.$inject = ['pluralise'];
function ctrl(pluralise) {
// use the pluraliser
}
<script src="pluralize.js"></script>
pluralise.pluralise('fox'); //=> "foxes"
pluralise.singularise('foxes'); //=> "fox"
MIT