Skip to content

Commit

Permalink
Clarify parameters of pluralize (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
gandazgul authored and blakeembrey committed May 25, 2019
1 parent c5de013 commit e2ed8d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ This module uses a pre-defined list of rules, applied in order, to singularize o

## Usage

* `word: string` The word to pluralize
* `count: number` How many of the word exist
* `inclusive: boolean` Whether to prefix with the number (e.g. 3 ducks)

Examples:

```javascript
pluralize('test') //=> "tests"
pluralize('test', 0) //=> "tests"
Expand Down
6 changes: 3 additions & 3 deletions pluralize.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@
/**
* Pluralize or singularize a word based on the passed in count.
*
* @param {string} word
* @param {number} count
* @param {boolean} inclusive
* @param {string} word The word to pluralize
* @param {number} count How many of the word exist
* @param {boolean} inclusive Whether to prefix with the number (e.g. 3 ducks)
* @return {string}
*/
function pluralize (word, count, inclusive) {
Expand Down

0 comments on commit e2ed8d1

Please sign in to comment.