{"id":13906444,"url":"https://github.com/santhoshtr/CLDRPluralRuleParser","last_synced_at":"2025-07-18T04:31:30.597Z","repository":{"id":3560354,"uuid":"4621800","full_name":"santhoshtr/CLDRPluralRuleParser","owner":"santhoshtr","description":"CLDR Plural Rule Parser","archived":false,"fork":false,"pushed_at":"2023-10-17T06:23:20.000Z","size":844,"stargazers_count":18,"open_issues_count":9,"forks_count":14,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-06-11T20:16:58.127Z","etag":null,"topics":["cldr","parser","plural-rules"],"latest_commit_sha":null,"homepage":"https://cldrpluralruleparser.netlify.app/demo/","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/santhoshtr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2012-06-11T06:42:20.000Z","updated_at":"2024-06-18T16:42:03.745Z","dependencies_parsed_at":"2024-06-18T16:41:53.674Z","dependency_job_id":"36ec1522-2075-4945-aaee-fa0bb66ebb61","html_url":"https://github.com/santhoshtr/CLDRPluralRuleParser","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhoshtr%2FCLDRPluralRuleParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhoshtr%2FCLDRPluralRuleParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhoshtr%2FCLDRPluralRuleParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhoshtr%2FCLDRPluralRuleParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santhoshtr","download_url":"https://codeload.github.com/santhoshtr/CLDRPluralRuleParser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226344644,"owners_count":17610180,"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":["cldr","parser","plural-rules"],"created_at":"2024-08-06T23:01:35.933Z","updated_at":"2024-11-25T14:31:34.212Z","avatar_url":"https://github.com/santhoshtr.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"CLDR Plural Rule Evaluator\n==========================\nFind out the plural form for a given number in a language\n[![NPM version](https://badge.fury.io/js/cldrpluralruleparser.svg)](https://www.npmjs.org/package/cldrpluralruleparser)\n[![Node.js CI](https://github.com/santhoshtr/CLDRPluralRuleParser/actions/workflows/node.js.yml/badge.svg)](https://github.com/santhoshtr/CLDRPluralRuleParser/actions/workflows/node.js.yml)\n\nQuick start\n----------\n\n```bash\ngit clone https://github.com/santhoshtr/CLDRPluralRuleParser.git\nnpm install\n```\n\nDocumentation\n----------\n\nUnlike English, for many languages, the plural forms are just not 2 forms.\nIf you look at the \u003ca href=\"http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#pl\"\u003eCLDR plural rules table\u003c/a\u003e\nyou can easily understand this. The rules are defined in a particular syntax\n(an eg: for Russian, the plural few is applied when the rule\n\"`n mod 10 in 2..4 and n mod 100 not in 12..14;`\" is passed).\n\nThis tool is a demonstration of a [javascript parser](./src/CLDRPluralRuleParser.js)\nfor the plural rules in that syntax.\n\nFor a given number in a language, this tool tells which plural form it belongs.\nThe plural rules are taken from the CLDR  data file\n\nExample\n--------\nDemonstration of the javascript parser at:\nhttp://thottingal.in/projects/js/plural/demo/\n\nTest\n----\n```npm test```\n\nNode module\n-----------\nThis is also available as a node module. You can install it using:\n\n`npm install cldrpluralruleparser`\n\nOnce installed it provides a command line utility named cldrpluralruleparser too.\n```\n$ cldrpluralruleparser 'n is 1' 0\nfalse\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanthoshtr%2FCLDRPluralRuleParser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanthoshtr%2FCLDRPluralRuleParser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanthoshtr%2FCLDRPluralRuleParser/lists"}