-
Notifications
You must be signed in to change notification settings - Fork 12
Simple streams
Ruben Verborgh edited this page Mar 11, 2016
·
1 revision
A proposal by @RubenVerborgh.
extends EventEmitter
-
void stream.on('readable', function () {})
-
void stream.on('end', function () {})
-
Quad stream.read()
And additionally
void stream.on('data', function (Quad quad) {})
which simply reads the stream on readable and emits quads.
Stream can have convenience methods like
Stream stream.filter(function (Quad quad) {})
(I have a library for this that is 99% ready.)
Stream source.find(Node subject, Node predicate, Node object, Node graph)
void sink.read(Stream stream)