frictionlessdata / datapackage-js

A JavaScript library for working with Data Package.
http://frictionlessdata.io/
MIT License
43 stars 15 forks source link

Should `stream` return objects or raw stream #4

Closed rufuspollock closed 8 years ago

rufuspollock commented 8 years ago

Currently have:

stream // object stream
rawStream // raw byte stream
objects // convenience function to give you an array of objects

Is this is the right semantics? Should we change stream to rawStream and add objectStream

pwalsh commented 8 years ago

I'm happy with how it is actually.

I'm not too convinced on the need for objects though: I think we'd always want an iterator that is lazy, and, if a consumer wants to "store" the whole data in a data structure like an array, they could write it for their own needs. Also thinking about things like large CSVs in data packages.

rufuspollock commented 8 years ago

@pwalsh i agree re objects i wrote it as more a convenience for tests (and it is surprisingly useful for small files) but maybe we drop from official API.

rufuspollock commented 8 years ago

WONTFIX / INVALID.