Skip to content

laggingreflex/streams-to-async-iterator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

A simple stream to async iterator

Resources

Stars

Watchers

Forks

Packages

No packages published