{"id":24383439,"url":"https://github.com/firstandthird/combinations","last_synced_at":"2025-04-11T01:12:21.892Z","repository":{"id":4265010,"uuid":"5392243","full_name":"firstandthird/combinations","owner":"firstandthird","description":"Node library to find all combinations from an array","archived":false,"fork":false,"pushed_at":"2023-05-16T16:57:57.000Z","size":8,"stargazers_count":24,"open_issues_count":9,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T01:12:17.736Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/firstandthird.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2012-08-12T21:48:27.000Z","updated_at":"2024-12-14T04:21:36.000Z","dependencies_parsed_at":"2023-07-05T21:32:48.326Z","dependency_job_id":null,"html_url":"https://github.com/firstandthird/combinations","commit_stats":null,"previous_names":["jgallen23/combinations"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fcombinations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fcombinations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fcombinations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fcombinations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstandthird","download_url":"https://codeload.github.com/firstandthird/combinations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322571,"owners_count":21084337,"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":"2025-01-19T10:14:28.809Z","updated_at":"2025-04-11T01:12:21.874Z","avatar_url":"https://github.com/firstandthird.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Combinations [![Build Status](https://travis-ci.org/jgallen23/combinations.svg?branch=master)](https://travis-ci.org/jgallen23/combinations)\n============\n\n# Installation\n\n    npm install combinations\n\n# Usage\n\n    combinations(array, [min_output_array_size], [max])\n\n*   takes in an array, and outputs an array of arrays, containing all possible combinations of values in the original array.\n*   combinations are of all sizes: all combinations of one element, and all combinations of 2 elements, and so on\n*   minimum number of elements in a combination can be specified (min_output_array_size)\n*   maximum number of elements in a combination can be also specified\n*   if maximum combination value is bigger than array elements it will be overridden to the array length\n\n# Example\n\n    var combinations = require('combinations');\n    var myArray = ['red', 'orange', 'yellow', 'green'];\n    \n    combinations(myArray); \n  \n    //Output:\n    //  [ [ 'red' ],                      [ 'orange' ],    \n    //    [ 'yellow' ],                   [ 'green' ],  \n    //    [ 'red', 'orange' ],            [ 'red', 'yellow' ],\n    //    [ 'red', 'green' ],             [ 'orange', 'yellow' ],\n    //    [ 'orange', 'green' ],          [ 'yellow', 'green' ],\n    //    [ 'red', 'orange', 'yellow' ],  [ 'red', 'orange', 'green' ],\n    //    [ 'red', 'yellow', 'green' ],   [ 'orange', 'yellow', 'green' ],\n    //    [ 'red', 'orange', 'yellow', 'green' ] ]\n\n# Example with a minimum array size\n\n    combinations(myArray, 2);\n    \n    //Output:\n    //  [ [ 'red', 'orange' ],            [ 'red', 'yellow' ],\n    //    [ 'red', 'green' ],             [ 'orange', 'yellow' ],\n    //    [ 'orange', 'green' ],          [ 'yellow', 'green' ],\n    //    [ 'red', 'orange', 'yellow' ],  [ 'red', 'orange', 'green' ],\n    //    [ 'red', 'yellow', 'green' ],   [ 'orange', 'yellow', 'green' ],\n    //    [ 'red', 'orange', 'yellow', 'green' ] ]\n\n# Example with a minimum and maximum array size\n\n    combinations(myArray, 2, 3);\n    \n    //Output:\n    //  [ [ 'red', 'orange' ],            [ 'red', 'yellow' ],\n    //    [ 'red', 'green' ],             [ 'orange', 'yellow' ],\n    //    [ 'orange', 'green' ],          [ 'yellow', 'green' ],\n    //    [ 'red', 'orange', 'yellow' ],  [ 'red', 'orange', 'green' ],\n    //    [ 'red', 'yellow', 'green' ],   [ 'orange', 'yellow', 'green' ] ]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fcombinations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstandthird%2Fcombinations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fcombinations/lists"}