Репозитоий переименован во frontend, обновлены зависимости, добавлен eslint-config
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# pluralize
|
||||
|
||||
Склонение существительных в зависимости от чила
|
||||
Склонение существительных в зависимости от числа
|
||||
|
||||
## Использование
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export const pluralize = (count, words) => {
|
||||
count = Math.abs(count) % 100;
|
||||
const count10 = count % 10;
|
||||
if (count > 10 && count < 20) {
|
||||
const normalizedCount = Math.abs(count) % 100;
|
||||
const count10 = normalizedCount % 10;
|
||||
if (normalizedCount > 10 && normalizedCount < 20) {
|
||||
return words[2];
|
||||
}
|
||||
if (count10 > 1 && count10 < 5) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitea.optiweb.ru/public/helpers.git"
|
||||
"url": "https://gitea.optiweb.ru/public/frontend.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
|
||||
Reference in New Issue
Block a user