{"id":25171244,"url":"https://github.com/basemax/yourcombinationsjs","last_synced_at":"2025-05-05T20:46:57.696Z","repository":{"id":60771955,"uuid":"545356803","full_name":"BaseMax/YourCombinationsJS","owner":"BaseMax","description":"An efficient combinatorics library for JavaScript to generate and get the list of all Permutations and Combinations with the ability to enable or disable repetition. (utilizing ES2015 generators)","archived":false,"fork":false,"pushed_at":"2022-10-26T17:25:47.000Z","size":51,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-04T21:45:55.963Z","etag":null,"topics":["combination","combination-without-repetition","combinational","combinational-logic","combinations","combinations-generator","combinations-with-repetition","combinations-without-repetition","javascript","js","permutation","permutation-algorithms","permutation-generator","permutations","permutations-generator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.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":"2022-10-04T08:12:28.000Z","updated_at":"2023-02-17T03:44:44.000Z","dependencies_parsed_at":"2023-01-20T14:00:21.734Z","dependency_job_id":null,"html_url":"https://github.com/BaseMax/YourCombinationsJS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FYourCombinationsJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FYourCombinationsJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FYourCombinationsJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FYourCombinationsJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/YourCombinationsJS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252575038,"owners_count":21770503,"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":["combination","combination-without-repetition","combinational","combinational-logic","combinations","combinations-generator","combinations-with-repetition","combinations-without-repetition","javascript","js","permutation","permutation-algorithms","permutation-generator","permutations","permutations-generator"],"created_at":"2025-02-09T09:19:40.749Z","updated_at":"2025-05-05T20:46:57.679Z","avatar_url":"https://github.com/BaseMax.png","language":"JavaScript","readme":"# You Combinations JavaScript (JS)\n\nAn efficient combinatorics library for JavaScript to generate and get the list of all **Permutations** and **Combinations** with the ability to enable or disable repetition. (utilizing ES2015 generators)\n\n## Functions\n\n- [PowerSet](#powerset)\n- [Permutation with repetition](#permutation-with-repetition)\n- [Permutation without repetition](#permutation-without-repetition)\n- [Combinations with repetition](#your_combinations-with-repetition)\n- [Combinations without repetition](#your_combinations-without-repetition)\n\n## Usage\n\n### PowerSet\n\n```javascript\nconst your_combinations = new YourCombinations([1, 2, 3]);\n[...your_your_combinations.powerSet()]\n\n// [\n//   [],       [ 1 ],\n//   [ 2 ],    [ 1, 2 ],\n//   [ 3 ],    [ 1, 3 ],\n//   [ 2, 3 ], [ 1, 2, 3 ]\n// ]\n```\n\n### Permutation with repetition\n\n```javascript\nconst your_combinations = new YourCombinations([1, 2, 3]);\nyour_your_combinations.permutations(4, true);\n\n// [ 1, 1, 1, 1 ]\n// [ 1, 1, 1, 2 ]\n// [ 1, 1, 1, 3 ]\n// [ 1, 1, 2, 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, 1 ]\n// [ 3, 1, 2, 2 ]\n// [ 3, 1, 2, 3 ]\n// [ 3, 1, 3, 1 ]\n// [ 3, 1, 3, 2 ]\n// [ 3, 1, 3, 3 ]\n// [ 3, 2, 1, 1 ]\n// [ 3, 2, 1, 2 ]\n// [ 3, 2, 1, 3 ]\n// [ 3, 2, 2, 1 ]\n// [ 3, 2, 2, 2 ]\n// [ 3, 2, 2, 3 ]\n// [ 3, 2, 3, 1 ]\n// [ 3, 2, 3, 2 ]\n// [ 3, 2, 3, 3 ]\n// [ 3, 3, 1, 1 ]\n// [ 3, 3, 1, 2 ]\n// [ 3, 3, 1, 3 ]\n// [ 3, 3, 2, 1 ]\n// [ 3, 3, 2, 2 ]\n// [ 3, 3, 2, 3 ]\n// [ 3, 3, 3, 1 ]\n// [ 3, 3, 3, 2 ]\n// [ 3, 3, 3, 3 ]\n```\n\n### Permutation without repetition\n\n```javascript\nconst your_combinations = new YourCombinations([1, 2, 3]);\nyour_your_combinations.permutations(2, false);\n\n// [ 1, 2 ]\n// [ 1, 3 ]\n// [ 2, 1 ]\n// [ 2, 3 ]\n// [ 3, 1 ]\n// [ 3, 2 ]\n```\n\n### Combinations with repetition\n\n```javascript\nconst your_combinations = new YourCombinations([1, 2, 3]);\nyour_your_combinations.your_combinations(4, true);\n\n// [ 1, 1, 1, 1 ]\n// [ 1, 1, 1, 2 ]\n// [ 1, 1, 1, 3 ]\n// [ 1, 1, 2, 2 ]\n// [ 1, 1, 2, 3 ]\n// [ 1, 1, 3, 3 ]\n// [ 1, 2, 2, 2 ]\n// [ 1, 2, 2, 3 ]\n// [ 1, 2, 3, 3 ]\n// [ 1, 3, 3, 3 ]\n// [ 2, 2, 2, 2 ]\n// [ 2, 2, 2, 3 ]\n// [ 2, 2, 3, 3 ]\n// [ 2, 3, 3, 3 ]\n// [ 3, 3, 3, 3 ]\n```\n\n### Combinations without repetition\n\n```javascript\nconst your_combinations = new YourCombinations([1, 2, 3]);\nyour_your_combinations.your_combinations(2, false);\n\n// [ 1, 2 ]\n// [ 1, 3 ]\n// [ 2, 3 ]\n```\n\n© Copyright, 2022 Max Base\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fyourcombinationsjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fyourcombinationsjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fyourcombinationsjs/lists"}