From aed235cefa62de122f265ca7641dd5453454e69b Mon Sep 17 00:00:00 2001 From: Travis CI Date: Wed, 3 Jan 2018 12:58:22 +0000 Subject: [PATCH] Travis build: 927 --- README.md | 2 +- docs/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2dbb90255..089f22069 100644 --- a/README.md +++ b/README.md @@ -4176,7 +4176,7 @@ palindrome('taco cat'); // true If `num` is greater than `1` returns the plural form of the given string, else return the singular form. -Check if `num` is positive. Throw an appropriate `Error` if not, return the appropriate string otherwise. +Check if `num` is greater than `0`. Throw an appropriate `Error` if not, return the appropriate string otherwise. Omit the third argument, `items`, to use a default plural form same as `item` suffixed with a single `'s'`. ```js diff --git a/docs/index.html b/docs/index.html index c11e8ae60..a3609632c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -924,7 +924,7 @@ mask(1234567890, -4, '$'); // '1234$$$$$$' ); };
palindrome('taco cat'); // true
-

pluralize

If num is greater than 1 returns the plural form of the given string, else return the singular form.

Check if num is positive. Throw an appropriate Error if not, return the appropriate string otherwise. Omit the third argument, items, to use a default plural form same as item suffixed with a single 's'.

const pluralize = (num, item, items = item + 's') =>
+

pluralize

If num is greater than 1 returns the plural form of the given string, else return the singular form.

Check if num is greater than 0. Throw an appropriate Error if not, return the appropriate string otherwise. Omit the third argument, items, to use a default plural form same as item suffixed with a single 's'.

const pluralize = (num, item, items = item + 's') =>
   num <= 0
     ? (() => {
         throw new Error(`'num' should be >= 1. Value povided was ${num}.`);