Closed satazor closed 11 years ago
I could output an event emitter, I suppose. Perhaps with a file
event which will give you the metadata for the file and a ReadableStream of the contents. A stream doesn't seem right though. How do you send multiple files and their metadata in one stream without forcing the user to basically build their own parser?
Yes, data
does not make sense since it won't work for multiple files so :+1: for file
and return EventEmitter
.
I don't think we should expose promises. While promises can be used inside, they should not be used in the API as per node standards.
Also, I think
extract
should return astream
or aevent-emitter
, similar tonode-tar
emitting data resulted from the parse of the zip (entries, etc). The regularend
andclose
events would be fired:end
for done,close
for done + finish writing to disk.