Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 890 Bytes

async_iterator.md

File metadata and controls

15 lines (11 loc) · 890 Bytes
title navtitle description keywords sort
Async iterator API
Async iterator
The Async iterator API is both scalable and elegant. It takes advantage of the native Readable Stream API upon which the parser is build to iterate over the parsed records.
csv
parse
api
async
iterator
3.4

Async iterator API

The Async iterator API is both scalable and elegant. It takes advantage of the native Readable Stream API upon which the parser is built to iterate over the parsed records.

The async iterator example below generates a CSV stream which is then parsed and iterated over. For each record, we simulate a slow asynchronous operation. This example is available with the command node samples/async.iterator.js.

embed:packages/csv-parse/samples/async.iterator.js