Half queue half pubsub. Super small (< 30 loc) and simple queue that supports subscribers.
Half queue half pubsub. Super small and simple queue that supports subscribers.
npm install kebab
var kebab = require'kebab'kb = kebab;
item is what ever you want to pass when a subscriber callback is called.
subscribe to a queued item. If one is currently available, callback will be invoked with it immediately.
Otherwise the callback will be invoked one time when an item is enqueued in the future.
kbonce console.log'working on ' arg; ;