I'm david, maintainer of the CSV module
(https://github.com/wdavidw/node-csv-parser).
I'm thinking to migrate the CSV parser from the old style api to the new
one. It also seems like a good idea to ask around what would be the best
practice in such case. An issue is created on GitHub:
https://github.com/wdavidw/node-csv-parser/issues/107. I introduce this
issue with:
It is time to migrate the CSV parser into the new [Stream
API](http://www.nodejs.org/api/stream.html). This issue is created to
all user of the parser. Please comment it with your own API suggestions,
feature list and implementation details. Write down all your wish list.
If API should evolve/break, this is the good time to do it.
I have a few questions relative to the implementation that I wish to ask
here.
1. Which API seems the best to the users. I'm thinking about 3 main classes:
- a Parser class which take strings/buffers and output an
arrays/objects of fields
- a Stringifier class which take arrays/objects and output
arrays/objects of fields
- a Transform class which is both a Parser and a Stringifier and is
used to transform a CSV stream into another CSV stream
Any suggestion is welcome
2. Considering the API described above, my understanding is that both
the Parser and Stringifier should be duplex or transform instances.
However, the API should differ slightly in the sense that the read
function of the Parser class should return an array or an object and the
write function of the Stringifier class should accept an array or an
object. Is this correct and acceptable ?
3. Is someone familiar with the new Stream api willing to behave as a
mentor to follow me and make sure I got this right during the
development phase?
Thanks in advance for the community feedback,
d.
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.