mesh-tailable-bus
v1.0.9
Published
Creates a bus that can be tailed for all actions executed against it.
Downloads
21
Readme
Creates a bus that can be tailed for all actions executed against it.
Installation: npm install mesh-tailable-bus
import TailableBus from 'mesh-tailable-bus';
var bus = TailableBus.create(NoopBus.create());
var tail = bus.createTail();
tail.pipeTo({
write: function(action) {
// handle tailed action - { action: "doSomething" }
},
close: function() { },
abort: function() { }
});
// trigger tail
bus.execute({ action: "doSomething" });