covertable
Index

npm version (opens in a new tab) Workflow (opens in a new tab) codecov (opens in a new tab) github (opens in a new tab)

What is covertable?

covertable is a powerful tool for generating pairwise combinations of input factors, designed for both Node.js and browser environments. It's easy to use, flexible, and supports advanced filtering options, making it perfect for testing scenarios and generating comprehensive datasets.

Installation

$ npm install covertable --save

Simple usage

import { make } from "covertable";
const machine = ["iPhone", "Pixel", "XPERIA", "ZenFone", "Galaxy"];
const os = ["iOS", "Android"];
const browser = ["FireFox", "Chrome", "Safari"];
make([machine, os, browser]);
[
  [ 'Pixel', 'iOS', 'Chrome' ],
  [ 'ZenFone', 'iOS', 'FireFox' ],
  [ 'Pixel', 'Android', 'Safari' ],
  [ 'Galaxy', 'Android', 'Chrome' ],
  [ 'XPERIA', 'Android', 'FireFox' ],
  [ 'Pixel', 'iOS', 'FireFox' ],
  [ 'iPhone', 'iOS', 'Safari' ],
  [ 'Galaxy', 'iOS', 'Safari' ],
  [ 'XPERIA', 'iOS', 'Chrome' ],
  [ 'ZenFone', 'Android', 'Chrome' ],
  [ 'Galaxy', 'iOS', 'FireFox' ],
  [ 'iPhone', 'Android', 'Chrome' ],
  [ 'iPhone', 'iOS', 'FireFox' ],
  [ 'ZenFone', 'iOS', 'Safari' ],
  [ 'XPERIA', 'iOS', 'Safari' ]
]

Others

Requirements

ES2015 or later