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

Add join operators #7

Open
andres-kovalev opened this issue Mar 24, 2020 · 0 comments
Open

Add join operators #7

andres-kovalev opened this issue Mar 24, 2020 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@andres-kovalev
Copy link
Owner

concat(...streams) to add each next stream to the end of previous one

concat([1,2,3], [4,5,6]) => [1,2,3,4,5,6]

merge(...steams) to take items one by one from each stream to build new stream

merge([1,2,3], [4,5,6]) => [1,4,2,5,3,6]

combine(combineFn, ...streams) to create new stream where each item is calculated using according items from source streams

const add = (a,b) => a + b;
combine(add, [1,2,3], [4,5,6]) => [5,7,9]

zip(...streams) creates an array of arrays using combine() under the hood

zip([1,2,3], [4,5,6]) => [[1,4], [2,5], [3,6]];

// equivalent to
combine((...args) => args, [1,2,3], [4,5,6]);
@andres-kovalev andres-kovalev added the enhancement New feature or request label Mar 24, 2020
@andres-kovalev andres-kovalev added this to the 1.1.0 milestone Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant