Combining a stream with a entire dataset
The main module exported by the package leverages the Node.js stream transform API. However, the input doesn't have to be a readable stream. Instead, it could be a CSV string and a Buffer. Also, the output doesn't have to be a writable stream, it could be a user callback function.
Uses it for convenience in case you are already interacting with a readable stream or a writable stream. It is not scalable because it implies that you either have all CSV dataset in memory and wish to pipe the generated records into a stream writer or that you have a stream reader generating a CSV data stream and wish to obtain a full dataset with all the records.
The signature of the output stream example is const stream = parse(input, [options])
. It takes an input string and an options object as arguments and return a readable stream.
Inversely, the signature of the input stream example is const stream = parse([options], callback)
. It takes an options object and a callback function as arguments and return a writable stream.