combine-data

1.0.5 • Public • Published

Combine Function

A simple JavaScript function that generates a combination set from given parameters.

Table of Contents

Installation

To use this function in your project, you can install it via npm:

npm install combine-data

Usage

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]    
//]

API

combine(params: any[][]): any[][]

A function that processes the input parameters into combinations.

  • params: The array of parameter array.

Returns the generated combinations.

License

This project is licensed under the MIT License.

Dependencies (0)

    Dev Dependencies (6)

    Package Sidebar

    Install

    npm i combine-data

    Weekly Downloads

    1

    Version

    1.0.5

    License

    ISC

    Unpacked Size

    5.36 kB

    Total Files

    11

    Last publish

    Collaborators

    • jkb.chrstwski