A simple JavaScript function that generates a combination set from given parameters.
To use this function in your project, you can install it via npm:
npm install combine-data
Import the function into your code and use it to generate a combination set of given data:
import { combine } from "combine-data"
const params = [
[1,2,3],
[4,5],
[6]
];
const combinations = combine(params);
console.log(combinations);
// Output:
//[
// [1, 4, 6],
// [1, 5, 6],
// [2, 4, 6],
// [2, 5, 6]
//]
A function that processes the input parameters into combinations.
-
params
: The array of parameter array.
Returns the generated combinations.
This project is licensed under the MIT License.