I am under the impression that it would be very important to keep the ability to access low level functionnality of the safe network when using safe-js, just like I discovered with the stream example.
On the other hand, in this precise case ( but I guess it may well be the case for various other situations ) , it seems that while manipulating streams in node-js is relatively straight forward using the stream module various powerful functions, in the browser it is another story, as there is no ( - well, I didn’t find any ? ) easily available library to access the stream contents at this level.
In the end by tinkering with the object’s internals I could locate what I was interested in, hiding in _readableState.buffer.head.data , so I suppose one could write functions to manipulate and use these results , but it seems it would be quite some work.
So, my feelings about this would be that :
it would be really important to keep safe-js capacity to transmit streams so that one can play with huge or real time files transmission
it would be very nice if there was a way to easily play with these streams in the browser , like one does in node.js with the stream module ( someone , a link ? ) )
it would be really nice, too, if one could ask safe-js for a non streaming version of a file, for instance if safe-js implemented both safeNFS.getFile and safeNFS.getFileAsStream