0.4.0 • Published 6 years ago

streams-to-async-iterator v0.4.0

Weekly downloads
440
License
-
Repository
github
Last release
6 years ago

streams-to-async-iterator

A simple stream to async iterator

Install

npm i streams-to-async-iterator

Usage

import toAsync from 'streams-to-async-iterator';

const stream = fs.createReadStream(filename);
const asyncStream = toAsync(stream);

for await (const chunk of asyncStream) {
  // ...
}

API

toAsync(stream)

  • stream Readable stream

Alternatives: