Using an Iterable
fromCollection([1, 2, 3, 4])
Using an AsyncIterable
fromCollection((async function* () {
yield 1
})())
Using an ArrayLike
fromCollection({
0: 'zero',
1: 'one',
2: 'two',
length: 3,
})
Streaming object entries
fromCollection({
one: 1,
two: 2,
three: 3,
})
// -[one, 1]-[two, 2]-[threee, 3]-|
Generated using TypeDoc
Creates a readable stream from an collection of values.