{"id":25716052,"url":"https://github.com/kota-yata/percom","last_synced_at":"2025-05-05T20:13:50.180Z","repository":{"id":38426416,"uuid":"263773277","full_name":"kota-yata/Percom","owner":"kota-yata","description":"No dependencies package to calculate and list permutation and combination.","archived":false,"fork":false,"pushed_at":"2024-08-30T05:32:07.000Z","size":4704,"stargazers_count":13,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T20:13:43.210Z","etag":null,"topics":["calculation","combinations","javascript","npm-module","permutations"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/percom","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/kota-yata.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-05-14T00:15:00.000Z","updated_at":"2024-04-26T03:13:34.000Z","dependencies_parsed_at":"2024-04-26T04:26:39.652Z","dependency_job_id":"42ff82bf-d1c6-4277-b7bc-c7070baa5cfc","html_url":"https://github.com/kota-yata/Percom","commit_stats":{"total_commits":67,"total_committers":5,"mean_commits":13.4,"dds":0.4925373134328358,"last_synced_commit":"1dbef632e8b13971e27dfcfe76dde59f04538fcf"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kota-yata%2FPercom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kota-yata%2FPercom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kota-yata%2FPercom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kota-yata%2FPercom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kota-yata","download_url":"https://codeload.github.com/kota-yata/Percom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252569646,"owners_count":21769517,"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":["calculation","combinations","javascript","npm-module","permutations"],"created_at":"2025-02-25T14:50:09.976Z","updated_at":"2025-05-05T20:13:50.159Z","avatar_url":"https://github.com/kota-yata.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Percom\n[![npm version](https://badge.fury.io/js/percom.svg)](https://badge.fury.io/js/percom) [![Build Status](https://travis-ci.org/kota-yata/Percom.svg?branch=master)](https://travis-ci.org/kota-yata/Percom) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n[![NPM](https://nodei.co/npm/percom.png)](https://nodei.co/npm/percom/)\n\nnpm package listing and calculating combination and permutation\n\n# Usage\n\n```\n$ npm i percom\n```\n\n  ## 1. Listing every possible combinatioins (組み合わせ)\n  ```JavaScript\n    import percom from \"percom\";\n  \n    percom.com(array,num); \n    //array =\u003e Target array (対象の配列)\n    //num =\u003e Number of elements in a combination (組み合わせの数)\n  ```\n  #### Example\n  ```JavaScript\n    const array = [\"A\",\"B\",\"C\"];\n    \n    const result1 = percom.com(array, 2);\n    //result1 = [ [ \"A\", \"B\" ], [ \"A, \"C ], [ \"B\", \"C\" ] ]\n    \n    const result2 = percom.com(array, 1);\n    //result2 = [ [ \"A\" ], [ \"B\" ], [ \"C\" ] ]\n  ```\n\n  ### Count the number of possible combination (組み合わせの数を数える)\n  ```JavaScript\n    percom.countCom(n, r);\n    //n =\u003e Number of elements in an array (要素数)\n    //r =\u003e Number of elements in a combination (選ぶ要素の数)\n  ```\n  #### Example\n  ```JavaScript\n    percom.countCom(8, 3);\n    // =\u003e 56\n  ```\n  \n  ## 2. Listing every possible permutaiton (順列)\n  ```JavaScript\n    percom.per(array,num);\n    //array =\u003e Target array (対象の配列)\n    //num =\u003e Number of elements in a permutation (一つ一つの順列の要素数)\n  ```\n \n  #### Example\n  ```JavaScript\n    const array = [\"A\",\"B\",\"C\"];\n    \n    const result1 = percom.per(array, 2);\n    //result1 = [ [ 'A', 'B' ], [ 'A', 'C' ], [ 'B', 'A' ], [ 'B', 'C' ], [ 'C', 'A' ], [ 'C', 'B' ] ]\n    \n    const result2 = percom.per(array, 1);\n    //result2 = [ [ \"A\" ], [ \"B\" ], [ \"C\" ] ]\n  ```\n  ### Count the number of possible permutation (順列の数を数える)\n  ```JavaScript\n    percom.countPer(n, r);\n    //n =\u003e Number of elements in an array (要素数)\n    //r =\u003e Number of elements in a permutation (一つ一つの順列の要素数)\n  ```\n  #### Example\n  ```JavaScript\n    percom.countPer(8, 3);\n    // =\u003e 336\n  ```\n\n# License\n  percom is under [MIT license](https://opensource.org/licenses/mit-license.php)\n  \n# Development\n```javascript\nyarn install\n\n// before create PR\nyarn mocha\n```\nSince lint-staged and husky are set up, your code will be formatted before commit.\n\n# Developer\n  Kota Yatagai (https://kota_yata.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkota-yata%2Fpercom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkota-yata%2Fpercom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkota-yata%2Fpercom/lists"}