Skip to content

petrgrishin/each-async

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

each-async

Async generators/iterators in parallel

// >= nodejs v10.17

const fileStream = fs.createReadStream('./file.txt');
const rl = readline.createInterface({
    input: fileStream,
    crlfDelay: Infinity,
});

await eachAsync(
    rl,
    async value => {
        console.log(value);
    },
    { 
      parallel: 2, 
    },
);

Releases

No releases published

Packages

No packages published