From 8c87f7971fb4a9bbd66d76664618d329ac271bcc Mon Sep 17 00:00:00 2001 From: Oleg Fedak Date: Thu, 11 Jul 2024 15:54:30 +0300 Subject: [PATCH] update tests --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 9b778a4..93b6ad5 100644 --- a/index.js +++ b/index.js @@ -40,7 +40,7 @@ var russianPluralGroups = function (n) { if (lastTwo !== 11 && end === 1) { return 0; } - if (2 <= end && end <= 4 && !(lastTwo >= 12 && lastTwo <= 14)) { + if (end >= 2 && end <= 4 && !(lastTwo >= 12 && lastTwo <= 14)) { return 1; } return 2; @@ -73,7 +73,7 @@ var defaultPluralRules = { polish: function (n) { if (n === 1) { return 0; } var end = n % 10; - return 2 <= end && end <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2; + return end >= 2 && end <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2; }, icelandic: function (n) { return (n % 10 !== 1 || n % 100 === 11) ? 1 : 0; }, slovenian: function (n) {