feat: dynamic singular and plural strings on triggers descriptions

This commit is contained in:
Sérgio Salgado 2021-04-06 00:59:33 +01:00
parent 58b74a6425
commit 95e10190b1
2 changed files with 19 additions and 6 deletions

View file

@ -26,4 +26,7 @@ const startCase = R.compose(
splitOnUpper
)
export { startCase, onlyFirstToUpper, formatLong }
const singularOrPlural = (amount, singularStr, pluralStr) =>
parseInt(amount) === 1 ? singularStr : pluralStr
export { startCase, onlyFirstToUpper, formatLong, singularOrPlural }