5.5.0 • Published 3 years ago
@opennetwork/progressive-merge v5.5.0
Progressive Merge
Take a set of async iterations and turn them into an array of the latest values for that iterator.
This is the general function signature to achieve this:
export async function *merge<T>(iterables: AsyncIterable<AsyncIterable<T>>): AsyncIterable<ReadonlyArray<T | undefined>> {
This allows us to take multiple functions producing values and group an update set together.
import { merge } from "@opennetwork/progressive-merge";
for await (const set of merge([[1, 2, 3, 4], [5, 6, 7, 8, 9]])) {
console.log(set);
}
The above logs:
[ 1, 5 ]
[ 2, 6 ]
[ 3, 7 ]
[ 4, 8 ]
[ 4, 9 ]
5.5.0
3 years ago
5.4.0
3 years ago
5.3.0
3 years ago
5.2.0
3 years ago
5.1.1
3 years ago
5.1.0
3 years ago
5.0.2
3 years ago
5.0.1
3 years ago
5.0.0
3 years ago
4.0.5
3 years ago
4.0.7
3 years ago
4.0.6
3 years ago
4.0.4
3 years ago
4.0.1
3 years ago
4.0.0
3 years ago
4.0.3
3 years ago
4.0.2
3 years ago
3.1.1
3 years ago
3.0.1
3 years ago
3.0.0
3 years ago
2.2.0
5 years ago
2.1.0
5 years ago
2.0.4
5 years ago
2.0.3
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.1
5 years ago