{"id":19778245,"url":"https://github.com/a-x-/cyrillic-inflector","last_synced_at":"2026-06-12T00:31:11.104Z","repository":{"id":47994765,"uuid":"90747266","full_name":"a-x-/cyrillic-inflector","owner":"a-x-","description":"cyrillic inflector (count, one, zero, some, many)","archived":false,"fork":false,"pushed_at":"2023-07-13T16:31:56.000Z","size":172,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T01:58:21.417Z","etag":null,"topics":["cyrillic","format","inflector","intl","number","units"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cyrillic-inflector","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a-x-.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-09T13:12:09.000Z","updated_at":"2022-07-20T11:23:58.000Z","dependencies_parsed_at":"2024-11-12T05:38:44.380Z","dependency_job_id":null,"html_url":"https://github.com/a-x-/cyrillic-inflector","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-x-%2Fcyrillic-inflector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-x-%2Fcyrillic-inflector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-x-%2Fcyrillic-inflector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-x-%2Fcyrillic-inflector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-x-","download_url":"https://codeload.github.com/a-x-/cyrillic-inflector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241108333,"owners_count":19910978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cyrillic","format","inflector","intl","number","units"],"created_at":"2024-11-12T05:28:36.757Z","updated_at":"2026-06-12T00:31:11.081Z","avatar_url":"https://github.com/a-x-.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cyrillic-inflector [![Build Status](https://travis-ci.org/a-x-/cyrillic-inflector.svg?branch=master)](https://travis-ci.org/a-x-/cyrillic-inflector)\ncyrillic inflector (count, one, zero, some, many)\n\n```js\nimport inflect from 'cyrillic-inflector';\n\ninflect(0, { zero: 'no calls', one: '{} call' }) // --\u003e no calls\n\nconst loadPhrase = inflect({\n  zero: 'Файлы не загружены',\n  one: 'Загружен {} файл',\n  some: 'Загружено {} файла',\n  many: 'Загружено {} файлов'\n});\ntest('complex zero', t =\u003e {\n  t.is(loadPhrase(0), 'Файлы не загружены');\n});\ntest('complex one', t =\u003e {\n  t.is(loadPhrase(31), 'Загружен 31 файл');\n});\ntest('complex some', t =\u003e {\n  t.is(loadPhrase(5564), 'Загружено 5564 файла');\n});\ntest('complex many', t =\u003e {\n  t.is(loadPhrase(100500), 'Загружено 100500 файлов');\n});\n```\n\nSee test.js for more typical and edge cases\n\n\n## TODO\n- [ ] find alternative solutions\n\n## Relative libs\n- [messageformat]\n  - genders\n  - multiple variables\n\n- [petrovich]\n  - automatic cyrillic inflector: ex-usser full names\n    \n[messageformat]: https://github.com/messageformat/messageformat.js\n[petrovich]: https://github.com/petrovich/petrovich-js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-x-%2Fcyrillic-inflector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-x-%2Fcyrillic-inflector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-x-%2Fcyrillic-inflector/lists"}