Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 1.19 KB

Readme.md

File metadata and controls

60 lines (38 loc) · 1.19 KB

Pluralize

Angular adaption of the great work by @blakeembrey

NPM version Build status Test coverage

Return a pluralized or singularized word based on the input string.

Installation

npm install pluralize --save
bower install pluralize --save

Angular

angular.module('MyApp', ['jp.pluralise']);

angular.module('MyApp')
  .controller('MyController',ctrl)

  ctrl.$inject = ['pluralise'];

  function ctrl(pluralise) {

    // use the pluraliser


  }

<script> tag

<script src="pluralize.js"></script>

Usage

pluralise.pluralise('fox'); //=> "foxes"
pluralise.singularise('foxes'); //=> "fox"

License

MIT