Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generate object combinations #3920

Merged
merged 2 commits into from
Jun 7, 2023
Merged

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Jun 7, 2023

About the changes

Generate object combinations (cartesian product):

    const obj = {
        sessionId: '1,2',
        appName: 'a,b,c',
        channels: 'internet',
    };

    const expectedCombinations = [
        { sessionId: '1', appName: 'a', channels: 'internet' },
        { sessionId: '1', appName: 'b', channels: 'internet' },
        { sessionId: '1', appName: 'c', channels: 'internet' },
        { sessionId: '2', appName: 'a', channels: 'internet' },
        { sessionId: '2', appName: 'b', channels: 'internet' },
        { sessionId: '2', appName: 'c', channels: 'internet' },
    ];

This will be used by playground multivalues

Important files

Discussion points

@vercel
Copy link

vercel bot commented Jun 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 7, 2023 1:45pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Jun 7, 2023 1:45pm

Copy link
Contributor

@andreas-unleash andreas-unleash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@kwasniew kwasniew enabled auto-merge (squash) June 7, 2023 13:56
@kwasniew kwasniew merged commit 3d34450 into main Jun 7, 2023
16 checks passed
@kwasniew kwasniew deleted the generate-object-combinations branch June 7, 2023 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants