{"id":18666161,"url":"https://github.com/pccomponentes/lexicographic-ranking","last_synced_at":"2025-04-11T23:32:30.768Z","repository":{"id":54805936,"uuid":"312653909","full_name":"PcComponentes/lexicographic-ranking","owner":"PcComponentes","description":"Lexicographic order calculator, useful for persisting ordered lists.","archived":false,"fork":false,"pushed_at":"2021-03-30T11:24:37.000Z","size":135,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T05:18:02.115Z","etag":null,"topics":["lexorank","ordering"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/PcComponentes.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}},"created_at":"2020-11-13T18:28:10.000Z","updated_at":"2024-12-02T19:13:24.000Z","dependencies_parsed_at":"2022-08-14T03:20:57.611Z","dependency_job_id":null,"html_url":"https://github.com/PcComponentes/lexicographic-ranking","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PcComponentes%2Flexicographic-ranking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PcComponentes%2Flexicographic-ranking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PcComponentes%2Flexicographic-ranking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PcComponentes%2Flexicographic-ranking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PcComponentes","download_url":"https://codeload.github.com/PcComponentes/lexicographic-ranking/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248495300,"owners_count":21113607,"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":["lexorank","ordering"],"created_at":"2024-11-07T08:30:45.988Z","updated_at":"2025-04-11T23:32:25.749Z","avatar_url":"https://github.com/PcComponentes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lexicographic Ranking\n\nLexicographic order calculator, useful for persisting ordered lists.\n\n## Installation\n\nInstall via [composer](https://getcomposer.org/)\n\n```shell\ncomposer require pccomponentes/lexicographic-ranking\n```\n\n## Usage\n\n```php\n$calculator = new RankingCalculator(\n    new Alpha36TokenSet(),\n    new DynamicMidPosition()\n);\n\necho $calculator-\u003ebetween('A', 'B');   // AU\necho $calculator-\u003ebetween('F6', 'Z');  // P\necho $calculator-\u003ebetween('FB', 'FW'); // FL\necho $calculator-\u003ebetween(null, '7');  // 3\necho $calculator-\u003ebetween(null, null); // U\n```\n\n## Config options\n### Token sets\n\nThe char pool to create the rankings. The following are available:\n```\nNumericTokenSet (0-9)\nAlpha36TokenSet (0-9 and A-Z)\nAlpha62TokenSet (0-9 and A-z)\n```\nTo create a custom one extend from TokenSet. \n\n### Position\nThe space to be left between ranks. The following modes are available:\n```\nFixedStartPosition  // Leaves a fixed amount of spaces after the first input\nFixedEndPosition    // Leaves a fixed amount of spaces before the second input\nDynamicMidPosition  // Leaves the same space before and after the result\n```\nTo create a custom one implement Position. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpccomponentes%2Flexicographic-ranking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpccomponentes%2Flexicographic-ranking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpccomponentes%2Flexicographic-ranking/lists"}