Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Combinations [![Build Status](https://travis-ci.org/jgallen23/combinations.svg?b

# Usage

combinations(array[, min_output_array_size])
combinations(array[, min, max])

* takes in an array, and outputs an array of arrays, containing all possible combinations of values in the original array.
* combinations are of all sizes: all combinations of one element, and all combinations of 2 elements, and so on
* minimum number of elements in a combination can be specified (min_output_array_size)
* maximum number of elements in a combination can be also specified
*   `min` sets minimum number of elements in a combination
*   `max` sets maximum number of elements in a combination
* if maximum combination value is bigger than array elements it will be overridden to the array length

# Example
Expand Down Expand Up @@ -53,4 +53,4 @@ Combinations [![Build Status](https://travis-ci.org/jgallen23/combinations.svg?b
// [ 'red', 'green' ], [ 'orange', 'yellow' ],
// [ 'orange', 'green' ], [ 'yellow', 'green' ],
// [ 'red', 'orange', 'yellow' ], [ 'red', 'orange', 'green' ],
// [ 'red', 'yellow', 'green' ], [ 'orange', 'yellow', 'green' ] ]
// [ 'red', 'yellow', 'green' ], [ 'orange', 'yellow', 'green' ] ]