package
Convert a pull-stream to an Async Iterable
npm install pull-awaitableGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Converts a pull-stream to an Async Iterable, usable with for-await-of
npm install --save pull-awaitableNOTE! AsyncIterables and for-await-of are only supported in in Node.js v10, Firefox 57+, and Chrome 66.
const pull = require('pull-stream')
const awaitable = require('pull-awaitable')
async function main() {
const stream = pull.values(['a', 'b']);
for await (const x of awaitable(stream)) {
console.log(x); // 'a'
// 'b'
}
}
main()Estimated unpacked size across 3 packages.
11.1 kB
Includes dependencies.