@3xpo/combgen
TypeScript icon, indicating that this package has built-in type declarations

0.2.17 • Public • Published

combgen

Generates combinations.

Example Usage:

const inputObject = {
  a: [1, 2],
  b: [true, false],
};

const result = generateCombinations(inputObject);

const expectedObj = [
  { a: 1, b: true },
  { a: 1, b: false },
  { a: 2, b: true },
  { a: 2, b: false },
];

if (JSON.stringify(expectedObj) !== JSON.stringify(result))
  throw new Error('mismatch');

Readme

Keywords

none

Package Sidebar

Install

npm i @3xpo/combgen

Weekly Downloads

2

Version

0.2.17

License

MIT

Unpacked Size

16.2 kB

Total Files

11

Last publish

Collaborators

  • exponentialworkload