Compare commits

..

No commits in common. "master" and "@advdominion/is@1.0.1" have entirely different histories.

5 changed files with 0 additions and 58 deletions

View File

@ -1,13 +0,0 @@
# helpers
## Добавление нового пакета
1. Скопировать один из существующих пакетов в папке `packages`
2. На его основе подготовить новый пакет
3. Запустить `yarn`
## Публикация новых версий
```
yarn lerna publish
```

View File

@ -1,11 +0,0 @@
# pluralize
Склонение существительных в зависимости от чила
## Использование
```js
import { pluralize } from '@advdominion/pluralize';
console.log(pluralize(1, ['яблоко', 'яблока', 'яблок']));
```

View File

@ -1,14 +0,0 @@
export const pluralize = (count, words) => {
count = Math.abs(count) % 100;
const count10 = count % 10;
if (count > 10 && count < 20) {
return words[2];
}
if (count10 > 1 && count10 < 5) {
return words[1];
}
if (count10 === 1) {
return words[0];
}
return words[2];
};

View File

@ -1,14 +0,0 @@
{
"name": "@advdominion/pluralize",
"version": "1.0.1",
"type": "module",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://gitea.optiweb.ru/public/helpers.git"
},
"license": "MIT",
"publishConfig": {
"access": "public"
}
}

View File

@ -17,12 +17,6 @@ __metadata:
languageName: unknown
linkType: soft
"@advdominion/pluralize@workspace:packages/pluralize":
version: 0.0.0-use.local
resolution: "@advdominion/pluralize@workspace:packages/pluralize"
languageName: unknown
linkType: soft
"@babel/code-frame@npm:^7.0.0":
version: 7.24.2
resolution: "@babel/code-frame@npm:7.24.2"