{"id":17402822,"url":"https://github.com/thlorenz/prange","last_synced_at":"2025-04-30T06:44:55.630Z","repository":{"id":57329338,"uuid":"83939813","full_name":"thlorenz/prange","owner":"thlorenz","description":"Parses poker hand range short notation into a range array.","archived":false,"fork":false,"pushed_at":"2017-12-01T07:08:21.000Z","size":1189,"stargazers_count":23,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T06:44:55.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://thlorenz.github.io/prange","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/thlorenz.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":"2017-03-05T02:44:55.000Z","updated_at":"2025-02-17T12:55:35.000Z","dependencies_parsed_at":"2022-09-11T08:51:27.305Z","dependency_job_id":null,"html_url":"https://github.com/thlorenz/prange","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Fprange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Fprange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Fprange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thlorenz%2Fprange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thlorenz","download_url":"https://codeload.github.com/thlorenz/prange/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251658196,"owners_count":21622819,"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":[],"created_at":"2024-10-16T18:28:55.550Z","updated_at":"2025-04-30T06:44:55.580Z","avatar_url":"https://github.com/thlorenz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prange [![build status](https://secure.travis-ci.org/thlorenz/prange.png)](http://travis-ci.org/thlorenz/prange)\n\nParses poker hand range short notation into a range array.\n\n```js\nconst prange = require('./')\n\nconst r1 = prange('AKs-ATs, QQ+')\nconst r2 = prange('JTs-54s')\n\nconsole.log(r1)\n// [ 'AA', 'AKs', 'AQs', 'AJs', 'ATs', 'KK', 'QQ' ]\n\nconsole.log(r2)\n// [ 'JTs', 'T9s', '98s', '87s', '76s', '65s', '54s' ]\n\nconsole.log(prange.reverse(r1))\n// QQ+, ATs+\n\nconsole.log(prange.reverse(r2))\n// JTs-54s\n```\n\n## Installation\n\n    npm install prange\n\n## [API](https://thlorenz.github.io/prange)\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n### prange\n\nConverts a short notation for poker hand ranges into an array\nfilled with the matching combos.\n\nEach range specifier is separated by a comma.\n\nThe following notations are supported:\n\n-   single combos `KK, AK, ATs`\n-   plus notation\n    -   `QQ+` = `[ AA, KK, QQ ]`\n    -   `KTs+` = `[ KQs, KJs, KTs ]`\n    -   `KTo+` = `[ KQo, KJo, KTo ]`\n    -   `KT+` = `[ KQs, KQo, KJo, KJs, KTo, KTs ]`\n-   dash notation\n    -   `KK-JJ` = `[ KK, QQ, JJ ]`\n    -   `AKo-ATo` = `[ AK, AQ, AJ, AT ]`\n    -   `AKs-JTs` = `[ AKs, KQs, JTs ]`\n\n**Parameters**\n\n-   `s` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the short notation for the range\n\nReturns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** all hand combos satisfying the given range\n\n### prange.reverse\n\nConverts a poker hand range to short notation.\nIt's the opposite of `prange`.\n\n**Parameters**\n\n-   `combos` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** hand combos to be converted to short notation\n-   `the` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** short notation for the range\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthlorenz%2Fprange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthlorenz%2Fprange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthlorenz%2Fprange/lists"}