getify / revocable-queue

Specialized async queue data structure, supports revocation of values

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

helper for creating an iterable from event source

getify opened this issue · comments

This will be a common pattern:

var q = RevocableQueue.create();
events.on("some-event",q.push);
var it = RevocableQueue.lazyZip(q);

So create a helper for it:

var it = RevocableQueue.eventIterable(events,"some-event");