RDF/JS: Stream interfaces – A specification of a low level interface definition representing RDF data independent of a serialized format in a JavaScript environment.
In Typical use cases we could add more types, but maybe that would be to confusing in the end. Stream stream could be Stream<Buffer or String or Object> stream. Buffer to cover binary formats and encoding specific text formats, String for text formats and Object for formats which are serialized into JS objects, like JSON-LD.
Stream extends from EventEmitter, but that interface is not defined in the spec. Do we want to reference to the Node.js EventEmitter class or define our own interface in the spec? Could be a topic for a different PR.
This PR should fix #2.
Two remarks:
Typical use cases
we could add more types, but maybe that would be to confusing in the end.Stream stream
could beStream<Buffer or String or Object> stream
.Buffer
to cover binary formats and encoding specific text formats,String
for text formats andObject
for formats which are serialized into JS objects, like JSON-LD.Stream
extends fromEventEmitter
, but that interface is not defined in the spec. Do we want to reference to the Node.js EventEmitter class or define our own interface in the spec? Could be a topic for a different PR.