{"id":49916622,"url":"https://github.com/marcosem/rolld20","last_synced_at":"2026-05-16T17:05:43.235Z","repository":{"id":65491202,"uuid":"342328844","full_name":"marcosem/rolld20","owner":"marcosem","description":"A simple tool designed to roll dices, of any side d2 (flip coin), d3, d4, d6, d8, d12, d20, d30, d60, d100, d1000, and jan-ken-po.","archived":false,"fork":false,"pushed_at":"2021-02-25T22:45:32.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-25T08:46:38.541Z","etag":null,"topics":["coin","d10","d100","d1000","d12","d2","d20","d3","d30","d6","d60","d8","dice","flip","jan-ken-po","roll"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcosem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-25T17:43:45.000Z","updated_at":"2023-02-28T10:37:49.000Z","dependencies_parsed_at":"2023-01-25T18:45:32.522Z","dependency_job_id":null,"html_url":"https://github.com/marcosem/rolld20","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marcosem/rolld20","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosem%2Frolld20","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosem%2Frolld20/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosem%2Frolld20/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosem%2Frolld20/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcosem","download_url":"https://codeload.github.com/marcosem/rolld20/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosem%2Frolld20/sbom","scorecard":{"id":618322,"data":{"date":"2025-08-11","repo":{"name":"github.com/marcosem/rolld20","commit":"f03f6f4d5e9649ac8b830be5adbed7a5d1112edf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T04:34:09.073Z","repository_id":65491202,"created_at":"2025-08-21T04:34:09.073Z","updated_at":"2025-08-21T04:34:09.073Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33111497,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["coin","d10","d100","d1000","d12","d2","d20","d3","d30","d6","d60","d8","dice","flip","jan-ken-po","roll"],"created_at":"2026-05-16T17:05:42.409Z","updated_at":"2026-05-16T17:05:43.226Z","avatar_url":"https://github.com/marcosem.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Roll d20 🎲\n\nA simple tool designed to roll dices, of any side: d2 (flip coin), d3, d4, d6, d8, d12, d20, d30, d60, d100, d1000, and jan-ken-po.\n\n```\nnpm i rolld20\nyarn add rolld20\n```\n\n## Usage\n\n### Pick a Dice\n### 2 sides dice (d2) / flip a coin\n\n```js\nimport { d2, flipCoin } from 'rolld20'\n\n// Rolling d2 🎲👋\nd2(); // return a random number between 1-2;\nd2(10); // return an array of 10 elements with random numbers between 1-2;\n\nflipCoin(); // return a string: 'heads' or 'tails\" at random;\n```\n\n### 3 sides dice (d3)\n\n```js\nimport { d3 } from 'rolld20'\n // Rolling d3 🎲👋\nd3(); // return a random number between 1-3;\nd3(10); // return an array of 10 elements with random numbers between 1-3;\n```\n\n### 4 sides dice (d4)\n\n```js\nimport { d4 } from 'rolld20'\n\n // Rolling d4 🎲👋\nd4(); // return a random number between 1-4;\nd4(10); // return an array of 10 elements with random numbers between 1-4;\n```\n\n### 6 sides dice (d6)\n\n```js\nimport { d6 } from 'rolld20'\n\n// Rolling d6 🎲👋\nd6(); // return a random number between 1-6;\nd6(10); // return an array of 10 elements with random numbers between 1-6;\n```\n\n### 8 sides dice (d8)\n\n```js\nimport { d8 } from 'rolld20'\n\n// Rolling d8 🎲👋\nd8(); // return a random number between 1-8;\nd8(10); // return an array of 10 elements with random numbers between 1-8;\n```\n\n### 10 sides dice (d10)\n\n```js\nimport { d10 } from 'rolld20'\n\n// Rolling d10 🎲👋\nd10(); // return a random number between 1-10;\nd10(10); // return an array of 10 elements with random numbers between 1-10;\n```\n\n### 12 sides dice (d12)\n\n```js\nimport { d12 } from 'rolld20'\n\n// Rolling d12 🎲👋\nd12(); // return a random number between 1-12;\nd12(10); // return an array of 10 elements with random numbers between 1-12;\n```\n\n### 20 sides dice (d20)\n\n```js\nimport { d20 } from 'rolld20'\n\n// Rolling d20 🎲👋\nd20(); // return a random number between 1-20;\nd20(10); // return an array of 10 elements with random numbers between 1-20;\n```\n\n### 30 sides dice (d30)\n\n```js\nimport { d30 } from 'rolld20'\n\n// Rolling d30 🎲👋\nd30(); // return a random number between 1-30;\nd30(10); // return an array of 10 elements with random numbers between 1-30;\n```\n\n### 60 sides dice (d60)\n\n```js\nimport { d60 } from 'rolld20'\n\n// Rolling d60 🎲👋\nd60(); // return a random number between 1-60;\nd60(10); // return an array of 10 elements with random numbers between 1-60;\n```\n\n### 100 sides dice (d100)\n\n```js\nimport { d100 } from 'rolld20'\n\n// Rolling d100 🎲👋\nd100(); // return a random number between 1-100;\nd100(10); // return an array of 10 elements with random numbers between 1-100;\n```\n\n### 1000 sides dice (d1000)\n\n```js\nimport { d1000 } from 'rolld20'\n\n// Rolling d1000 🎲👋\nd1000(); // return a random number between 1-1000;\nd1000(10); // return an array of 10 elements with random numbers between 1-1000;\n```\n\n### Rolling Jan-ken-po\n```js\nimport { janKenPo } from 'rolld20'\n\n// Rolling jan-ken-po ✊✋✌️\njanKenPo(); // return a string: 'rock', 'paper', or 'scissors' at random;\n\n// Rolling jan-ken-po with bomb allowed ✊✋✌️👍\njanKenPo(true); // return a string: 'rock', 'paper', 'scissors', or 'bomb' at random;\n```\n\n### Comparing Jan-ken-po\n```js\nimport { compareJanKenPo } from 'rolld20'\n\n// Compare two jan-ken-po ✊✋✌️👍 x ✊✋✌️👍\ncompareJanKenPo('paper', 'bomb'); // return 1 (bomb beats paper)\ncompareJanKenPo('scissor', 'paper'); // return -1 (scissors beats papaer)\ncompareJanKenPo('rock', 'rock'); // return 0 (it's a tie)\n```\n\n\n## Source code\n\nSee the source code [here](./src/index.ts).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosem%2Frolld20","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcosem%2Frolld20","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosem%2Frolld20/lists"}